#
6ae6a38e |
|
11-Feb-2023 |
Máximo Castañeda <antiswen@yahoo.es> |
app_server: refactor font managers Move common add/remove code to the base class and improve encapsulation. Loading FreeType is the responsibility of the global font manager. Rename FontManagerBase back to FontManager. Change-Id: I9396112f01583e19d03011106fd1fa1e37958ee8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6072 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
85d52d33 |
|
10-Feb-2023 |
Máximo Castañeda <antiswen@yahoo.es> |
app_server: push FontManager knowledge to FontStyle creation Change-Id: I98a68a894642147d398faf22591a22afef4c3ba2 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6060 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
|
#
85b82f85 |
|
19-Jul-2022 |
Dale Cieslak <dcieslak@yahoo.com> |
BFont: allow loading of user fonts from disk or memory This patch adds an API call to BFont, called LoadFont, that takes a string path to a font file. The user fonts are managed via a new class called AppFontManager that inherits from the base class FontManagerBase but adds the methods to add and remove user fonts from disk or memory. There is also a new method called UnloadFont to remove a user font, but on exit of an app all user fonts should be automatically cleaned up. Global/system fonts are managed by the GlobalFontManager, which is a new class that also inherits from the base class FontManagerBase, replacing the old "FontManager" class. A maximum of 128 user fonts may be loaded, and memory fonts may not exceed 20MB. There's also an overloaded version of LoadFont that accepts an area_id and loads the font from memory. A size and offset may optionally be provided to allow for an area that contains more than just a font. Change-Id: I6add42bdf0c0cefc0e2e2a4984fd848c3e7269e5 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4790 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
ef83008e |
|
18-Jul-2020 |
Kacper Kasper <kacperkasper@gmail.com> |
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>
|
#
a60e5cb4 |
|
26-May-2021 |
Máximo Castañeda <antiswen@yahoo.es> |
Get font metrics from a bitmap if there are no outlines FreeType only provides some font parameters for scalable fonts. In particular, we use the FT_Face values of units_per_EM, ascender, descender and height, which are 0 for bitmap-only fonts. Part of #16938. Change-Id: Iea2d87ad95f3bc1c2e27fb041da0a27c6e68be91 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4042 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
d4dbce29 |
|
07-Mar-2020 |
Augustin Cavalier <waddlesplash@gmail.com> |
app_server: Drop custom HashTable and use HashMap instead. Change-Id: I7d5aae6a7fd2b4f47704a931a23eee09a4eedcac Reviewed-on: https://review.haiku-os.org/c/haiku/+/2323 Reviewed-by: John Scipione <jscipione@gmail.com>
|
#
d9eeaa72 |
|
21-Feb-2014 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Server side support for BFont::IsFullAndHalfFixed(). Check a range of characters to see if they have the same width. Change-Id: I9cef12f78d1e1d01acc6284eae90dbfb86166fc6 Reviewed-on: https://review.haiku-os.org/47 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
1beeb1b0 |
|
08-Oct-2017 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
"thin" fonts are B_LIGHT_FACE In Noto fonts, "thin" is another level of "light" apparently (somewhere in between "extralight" and "medium"... lots of choice these days). Tell app_server about it so the proper font flags can be set. This may help avoid confusion, as Terminal (and FontDemo, in less predictable ways) tend to pick the "thin" variant of fonts even when "regular" is requested.
|
#
f4f30311 |
|
24-Jul-2011 |
Clemens Zeidler <clemens.zeidler@googlemail.com> |
Cleanup app server directory a bit by creating a font and a decorator sub folder. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42483 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f4f30311aab9b2768d3ef7e590f85598298edfe0 |
|
24-Jul-2011 |
Clemens Zeidler <clemens.zeidler@googlemail.com> |
Cleanup app server directory a bit by creating a font and a decorator sub folder. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42483 a95241bf-73f2-0310-859d-f6bbb57e9c96
|