FreeBSD Manual Pages
target_fonthint(3) Arcan Lua API target_fonthint(3) NAME target_fonthint - Send font drawing hints to target frameserver. SYNOPSIS bool:state, int:cellw, int:cellh target_fonthint( vid:dst, string:font, number:size_mm, int:hint ) target_fonthint( vid:dst, string:font, number:size_mm, int:hint, int:cont ) target_fonthint( vid:dst, number:size_mm, int:hint ) target_fonthint( vid:dst, number:size_mm, int:hint, int:cont ) DESCRIPTION The target_fonthint function sends a hint (and optionally a descriptor to the specified font resource in the ARCAN_SYS_FONT namespace) about how frameserver rendered text should be drawn into the specified seg- ment. The size_mm argument sets the desired 'normal' font size (in mm). Use target_displayhint to handle changes in underlying display pixel density. strength hints to anti-aliasing like this (0: dis- abled, 1: monospace, 2: weak, 3: medium, 4:strong) and if bit 8 is set (+ 256) try and apply subpixel hinting. It is still up to the renderer in the receiving frameserver to respect these flags and to match any rendering properties with corresponding displayhints in order for sizes to match. If the cont option is set to 1, this font is intended to be chained as a fallback in the case of missing glyphs in previously sup- plied fonts. The function returns true if the font was found and was forwarded correctly to the client, as well as the estimated cell width/height that will currently be used for size calculations of server-side text in monospaced form with the supplied fonts. NOTES 1 If -1 is used for size_mm and/or strength , the recipient should keep the currently hinted size. 2 To translate from the Postscript 'point size' to millimeter, multiply with the constant FONT_PT_SZ . 3 The actual font size will also vary with the density of the out- put segment. The density can be expressed via the target_dis- playhint function. 4 currently set as the default (using system_defaultfont ) EXAMPLE function target_fonthint0() local fsrv = launch_avfeed(function(source, status) end); target_fonthint(fsrv, "default.ttf", 10, 1); target_fonthint(fsrv, 1, 0); end SEE ALSO: system_defaultfont(3) targetcontrol April 2025 target_fonthint(3)
NAME | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLE | SEE ALSO:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=target_fonthint&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>