Module libif:fonts - Font interface library
Font interface library. This provides a variety of routines that can be used to interact with the service:fontengine service. To use these:
#INCLUDE "fontengine_chan.inc"
#USE "libif/fonts"
Index
-
Process
fontservice.catalog- Get a catalogue of fonts from the font-service -
Process
fontservice.connect- Connect to the font-engine service -
Process
fontservice.disconnect- Disconnect from the font-engine service -
Process
fontservice.loadfont- Loads a new font -
Process
fontservice.query- Query a particular font -
Process
fontservice.textrender- Renders text onto a raster
Declarations
fonts.occ:52Process fontservice.connect
PROC fontservice.connect (BOOL ok, SHARED CT.KERNEL! krnl, RESULT SHARED CT.FONTENGINE! fnt)
Connect to the font-engine service.
Parameters:
BOOL |
ok |
Check and set success. |
SHARED CT.KERNEL! |
krnl |
Link to kernel. |
RESULT SHARED CT.FONTENGINE! |
fnt |
Returned connection to the font-engine service. |
fonts.occ:96Process fontservice.disconnect
PROC fontservice.disconnect (BOOL ok, SHARED CT.FONTENGINE! fnt)
Disconnect from the font-engine service.
Parameters:
BOOL |
ok |
Check and set success. |
SHARED CT.FONTENGINE! |
fnt |
Connection to font-engine service. |
fonts.occ:108Process fontservice.loadfont
PROC fontservice.loadfont (BOOL ok, SHARED CT.FONTENGINE! fnt, VAL []BYTE filename, RESULT FONTATTR fattr)
Loads a new font.
Parameters:
BOOL |
ok |
Check and set success. |
SHARED CT.FONTENGINE! |
fnt |
Connection to font-engine service. |
VAL []BYTE |
filename |
Path to font file. |
RESULT FONTATTR |
fattr |
Font attributes set if successful. |
fonts.occ:132Process fontservice.query
PROC fontservice.query (BOOL ok, SHARED CT.FONTENGINE! fnt, VAL INT fid, RESULT FONTATTR fattr)
Query a particular font.
Parameters:
BOOL |
ok |
Check and set success. |
SHARED CT.FONTENGINE! |
fnt |
Connection to font-engine service. |
VAL INT |
fid |
Font ID. |
RESULT FONTATTR |
fattr |
Returned font attributes. |
fonts.occ:155Process fontservice.catalog
PROC fontservice.catalog (BOOL ok, SHARED CT.FONTENGINE! fnt, RESULT MOBILE []FONTATTR attrs)
Get a catalogue of fonts from the font-service.
Parameters:
BOOL |
ok |
Check and set success. |
SHARED CT.FONTENGINE! |
fnt |
Connection to font-engine service. |
RESULT MOBILE []FONTATTR |
attrs |
Returned array of font attributes. |
fonts.occ:216Process fontservice.textrender
PROC fontservice.textrender (SHARED CT.FONTENGINE! fnt, VAL INT x, y, font.id, VAL []BYTE string, MOBILE [][]INT32 raster, VAL [2]INT32 colours)
Renders text onto a raster.
Parameters:
SHARED CT.FONTENGINE! |
fnt |
Link to font-engine. |
VAL INT |
x, y
|
Text position. |
VAL INT |
font.id |
Font idenfitier. |
VAL []BYTE |
string |
Text to render. |
MOBILE [][]INT32 |
raster |
Raster on which to render text. |
VAL [2]INT32 |
colours |
Foreground and background colours. |