Page 1 of 1

Bold text

Posted: Mon Jul 24, 2017 6:16 am
by GregWills
Hi Everyone

I am using the line

set the textStyle of item 1 of line tBoldLineCount of field "Result" to bold

This works as expected in a standalone and the text is bold; but in a HTML5 build, the text is not bold.

Is this a 'feature' of HTML5 still, or is there a work around.

Regards

Greg

Re: Bold text

Posted: Mon Jul 24, 2017 11:32 am
by bogs
I don't mess around a lot in the html builder, but using the htmlText would work in both a standalone and the html generated build, I'd guess.

Code: Select all

set the htmlText of item 1 of line tBoldLineCount of field "Result" to bold
HTMLText
Type property
Syntax
set the HTMLText of [chunk of] field to htmlString
get the [effective] HTMLText of [chunk of] field
Summary
Specifies the contents of a field, including all text
styles and paragraph formatting, represented as
HTML tags and special characters represented as HTML entities.

Re: Bold text

Posted: Mon Jul 24, 2017 12:37 pm
by [-hh]
The HTML5 standalone builder is still "experimental". By that, among other basic things, textstyles don't work as usual. Especially setting some text style to bold, by styledText or htmlText, doesn't work if the corresponding bold-variant of the font in use is not available.

The "workaround" is to use for each style a special styled font or font-variant and to add the font file to the standalone (use "copy files"), so that LC can find it and set the font accordingly.

See for example on http://hyperhh.de/html5/ the demo Navigation & 'GraphicBtns', which is from Sept 2015 but was last compiled in Nov 2016 (replace "X.html" with ".zip" for the source and look into the folder fonts of the standalone).

Re: Bold text

Posted: Thu Jul 27, 2017 2:13 am
by GregWills
Thank you bogs and -hh for your comments.

For me, for now, it will have to wait :-)

Cheers

Greg

Re: Bold text

Posted: Thu Jul 27, 2017 4:44 am
by bogs
No problems Greg, let us know how you get along with it (I am sure hh's posting will help far more).