app_server: Implemented support for B_CHAR_SPACING.

Operating Systems / Haiku - Stephan Aßmus [gmx.de] - 26 February 2014 04:51 UTC

It doesn't yield quiet the expected results, yet. When hinting is turned on, FontEngine takes a measurement of the precise advance values for each cached glyph by invoking FT_Load_Glyph() with the FT_LOAD_NO_HINTING flag, before loading the glyph for real without that flag. In GlyphLayoutEngine.h, the precise advance value is used for B_CHAR_SPACING. The intended result is that glyphs are rendered hinted (according to global Appearance settings), but spaced along the base-line with precise, unhinted advance values. An application would use this for example to implement precise page or print preview and also for zooming text without altering the placement of glyphs. For Gobe Productive, problems can be observed, because we don't implement this correctly, yet.

d9d1432 app_server: Implemented support for B_CHAR_SPACING.
src/servers/app/font/FontCacheEntry.cpp | 11 +++++++----
src/servers/app/font/FontCacheEntry.h | 5 +++++
src/servers/app/font/FontEngine.cpp | 17 ++++++++++++++++-
src/servers/app/font/FontEngine.h | 6 ++++++
src/servers/app/font/GlyphLayoutEngine.h | 9 +++++++--
5 files changed, 41 insertions(+), 7 deletions(-)

Upstream: cgit.haiku-os.org


  • Share