haiku/src/servers/app/font
Kacper Kasper ef83008e79 app_server: add B_UNDERSCORE_FACE support
There was some confusion (and a TODO indicating it) in ServerFont.cpp,
because the notion of "font face" from the Be API is partially
implemented using different font manager styles (bold, italic, etc),
and partially by keeping flags in a separate variable for drawing
extra things or modifying the drawing (underscore, strikeout, ...).

The implementation did not actually preserve the extra flags, and so the
underscore face attribute was lost.

Implement the actual underlining of the text in AGGTextRenderer. This
implementation is a naive one so far. In particular there are the
following limitations:
1. Line is drawn over the text - no nice gaps for descents. Ideally, the
   line should not touch the letter descents, and leave some space
   around them. I don't know how to retrieve the contour - it appears to
   me this might require bigger refactoring of this code. I have left in
   my experiments commented out in the code.
2. If the text run ends with whitespace, the whitespace is not underlined
   as it should. In particular if another text run is drawn next to it
   and it's expected that the underline is continuous between the two.

Change-Id: I8d78b8e1eceddff0a7d98e5a49659e7b03fd89a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3041
Reviewed-by: Kacper Kasper <kacperkasper@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-07-25 08:39:57 +00:00
..
FontCache.cpp app_server memory management fixes: use BReference 2020-12-02 17:59:06 +00:00
FontCache.h app_server memory management fixes: use BReference 2020-12-02 17:59:06 +00:00
FontCacheEntry.cpp GlyphLayout: emit .nodef glyph for missing glyphs 2021-07-11 12:14:01 +00:00
FontCacheEntry.h app_server memory management: use ObjectDeleter to mark ownership 2020-12-03 18:45:14 +00:00
FontEngine.cpp Get font metrics from a bitmap if there are no outlines 2021-06-04 07:39:02 +00:00
FontEngine.h
FontFamily.cpp app_server: add B_UNDERSCORE_FACE support 2021-07-25 08:39:57 +00:00
FontFamily.h
FontManager.cpp use .IsSet() instead if .Get() != NULL 2021-02-02 15:17:54 +00:00
FontManager.h app_server memory management: use ObjectDeleter to mark ownership 2020-12-03 18:45:14 +00:00
FontStyle.cpp app_server: add B_UNDERSCORE_FACE support 2021-07-25 08:39:57 +00:00
FontStyle.h app_server memory management fixes: use BReference 2020-12-02 17:59:06 +00:00
GlyphLayoutEngine.h GlyphLayout: emit .nodef glyph for missing glyphs 2021-07-11 12:14:01 +00:00