Journal Manipulation

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Journal Manipulation

Postby J'Kla » Thu Apr 25, 2019 6:24 am

I am in the process of writing an Noobs guide to age building and I am in the process of doing a section on Journals

I have sorted the import of a book cover image and the command to get it to appear in the right place with

<cover src=”BookCover.hsm”>

after importing the image to the appropriate image library.

I have font, font size and font color sorted with the command

<font size=18 face=Tahoma color=000000>

Is there a command I can add to this to justify the text.

I have also managed to use the image library to insert an image into the body of the text with the command

<img src="WaterCarrier.hsm">

Is there some way to adjust this command to center the image horizontally or have any control over its position Found align=center for image going to try same with text. I have noticed that the image appears squashed horizontally.More forum surfing has revealed resize=no

Yet more forum surfing and I have found <p align=center> and experimentation has revealed <p align=left>

Is there any specific documentation for this?

It is clear the image pushes the text onward.

Any help would be appreciated.
User avatar
J'Kla
 
Posts: 1003
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: Journal Manipulation

Postby Sirius » Fri Apr 26, 2019 4:49 am

J'Kla wrote:Is there a command I can add to this to justify the text.

Probably. This is untested, but in regular HTML, the <p> tag supports justification like so:
Code: Select all
<p align="justify">

Plasma uses a subset of true HTML. It's heavily limited, but a few core features of HTML are available to it.

Actually, I'm wondering how many HTML tags Plasma supports... It would be interesting to document it somewhere. Not like I expect CSS, Javascript and Canvas to be available but still.

J'Kla wrote:It is clear the image pushes the text onward.

You're looking into having the text flow around the image ? I'm afraid I don't know how to do that, sorry :(
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Journal Manipulation

Postby Chacal » Fri Apr 26, 2019 12:08 pm

Sirius wrote:Actually, I'm wondering how many HTML tags Plasma supports... It would be interesting to document it somewhere. Not like I expect CSS, Javascript and Canvas to be available but still.


Next thing you know, someone rewrites Facebook in Python and it renders in a journal.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Journal Manipulation

Postby Deledrius » Fri Apr 26, 2019 1:38 pm

Sirius wrote:Not like I expect CSS, Javascript and Canvas to be available but still.

Especially not in an HTML subset written well before 2004!
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

Re: Journal Manipulation

Postby Sirius » Fri Apr 26, 2019 3:11 pm

Chacal wrote:Next thing you know, someone rewrites Facebook in Python and it renders in a journal.

Well, technically you *could* embed Chromium into Plasma and have it render to a texture which you then apply to a mesh. But that would be a bit overkill :)
Facebook would be really interested in being able to spy on users' habits though.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Journal Manipulation

Postby J'Kla » Tue Apr 30, 2019 3:02 am

I am knocking together a list so I can do an exhaustive test

Am I safe ignoring all of the HTML5 stuff?
User avatar
J'Kla
 
Posts: 1003
Joined: Wed Feb 20, 2008 3:16 pm
Location: Geordieland UK

Re: Journal Manipulation

Postby Sirius » Sun May 05, 2019 4:41 am

J'Kla wrote:Am I safe ignoring all of the HTML5 stuff?

Oh, definitely. HTML5 came years after Plasma.
You can also ignore all things related to Javascript and CSS - those are so complex only actual browsers use them. I expect Plasma's HTML to be very, very limited.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Journal Manipulation

Postby Deledrius » Sun May 05, 2019 2:46 pm

Sirius wrote:
J'Kla wrote:Am I safe ignoring all of the HTML5 stuff?

Oh, definitely. HTML5 came years after Plasma.
You can also ignore all things related to Javascript and CSS - those are so complex only actual browsers use them. I expect Plasma's HTML to be very, very limited.

Quite limited, just basic markup. The thread I linked to last time this question was asked has the most complete information at present.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

Re: Journal Manipulation

Postby JulyForToday » Sun Sep 06, 2020 11:40 pm

Quick necropost here. :lol:

I did some searching through the forum. This thread being the best reference I've found regarding Plasma HTML

I was curious if anyone knew whether or not it supports either bold, italics, or underline.

Something like this doesn't work:
<font face=Courier size=14 style=bold>

A couple of the fonts that come with Uru have bold/italic variations, although they have spaces in their file names. You have to wrap them in quotation marks to keep them from breaking the rest of the tag:
<font face="Courier Bold Italic" size=14>

But it still doesn't produce anything other than the normal style of font. Not sure if this is something Plasma actually supports, or if I'm wasting my time trying.
I also can't recall any use of that kind of formatting in journals from the game.
User avatar
JulyForToday
 
Posts: 118
Joined: Sat Sep 29, 2007 5:34 am

Re: Journal Manipulation

Postby Sirius » Mon Sep 07, 2020 2:12 am

Try putting your text inside <b></b> (or <strong></strong>), <i></i> (or <em></em>) and <u></u>. I have never tried it, but those are very old HTML tags, I think they should work.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Next

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 6 guests