BRT Community

General Category => Discussion - EVE => Topic started by: rsc on December 11, 2019, 01:16:37 PM

Title: Fonts and xxx.ttf files
Post by: rsc on December 11, 2019, 01:16:37 PM
Hello,

I want to generate a font for traditional and simplified Chinese.
this already works with the simfang.ttf and the eve asset builder.
Now we want to use other xxx.ttf files for fonts.

which xxx.ttf files one can I still use for this (except licenses)? What else do I have to consider to display the xxx.ttf files correctly?

Best Regards
rsc
Title: Re: Fonts and xxx.ttf files
Post by: Rudolph on December 12, 2019, 08:49:42 AM
>What else do I have to consider to display the xxx.ttf files correctly?

You have not told us if you are using EVE2 or EVE3.
If you are using EVE2 things are a lot more complicated.
If you are using EVE3 then just convert the font to extended format,
put the .glyph and the .xfont file in the external FLASH,
copy the .xfont file to G-RAM on start of your programm,
use cmd_setfont2() in your display list to assign a bitmap handle to your custom font
and last but not least make sure you are using UTF-8 encoding for your source-file in
order to have your cmd_text() commands behave like you expect them to.

Something to be considered is the size of the resulting .glyph file.
If you are using a font like NotoSans from Google it contains a lot of glyphs and it might be a good idea
to convert the font first in order to remove several languages that you do not want to support.