61.1 Overview
Hollywood's text library contains functions that deal with font management, text measurement, text drawing,
as well as text transformation. You can open fonts using the commands SetFont(), OpenFont(),
or @FONT. One important thing to know is that Hollywood supports two different text renderers:
- Inbuilt text renderer: This is the recommended renderer, although it isn't the default renderer due to
historical reasons. The inbuilt renderer operates completely independent of the host operating system's text
renderer and thus will guarantee that text looks exactly the same on every platform. The pixels drawn by
functions such as Print() and TextOut() will be exactly the same on
every platform if you use the inbuilt text renderer. You can access the inbuilt text renderer by setting
the
Engine tag of the SetFont(), OpenFont(), or @FONT
commands to #FONTENGINE_INBUILT.
- Native text renderer: This will use the host operating system's text renderer. Due to historical
reasons, this is also the default renderer but it isn't recommended to use it because text drawn using
this renderer will look slightly different on each platform. If this is no problem for you, you can
just go ahead and use it but if you aim to achieve an identical look on every platform, you should use
the inbuilt text renderer instead.
The inbuilt text renderer can also open *.ttf fonts directly, so you don't even have to install
fonts in order to use them with the inbuilt text renderer. You could just use code like this:
| | OpenFont(1, "c:/Windows/Fonts/Arial.ttf", 36, {Engine = #FONTENGINE_
INBUILT})
|
See Font specification for details.
See Working with fonts for details.
Show TOC