GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
target_fonthint(3) Arcan Lua API target_fonthint(3)

target_fonthint - Send font drawing hints to target frameserver.

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 )

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 segment. 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: disabled, 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 supplied 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.

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 output segment. The density can be expressed via the target_displayhint function.
4
currently set as the default (using system_defaultfont )

function target_fonthint0()
      local fsrv = launch_avfeed(function(source, status)
      end);
      target_fonthint(fsrv, "default.ttf", 10, 1);
      target_fonthint(fsrv, 1, 0);
end

system_defaultfont(3)

June 2022 targetcontrol

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.