[haiku-commits] haiku: hrev53928 - src/servers/app/font

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 29 Feb 2020 18:31:03 -0500 (EST)

hrev53928 adds 1 changeset to branch 'master'
old head: e9f38cca496c2c948dd0630afb38ab287fba4818
new head: 7a8d5a2db3214be378c4450bd94e07db75d5e240
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=7a8d5a2db321+%5Ee9f38cca496c

----------------------------------------------------------------------------

7a8d5a2db321: app_server: fix fallback for fonts where the variants match.
  
  This does not produce a satisfactory fallback if i.e "extrabold"
  is selected since the CJK font does not have that, probably need to
  figure out a way to change the font style so that it renders correctly
  (render cjk as bold when display is at extrabold or so).
  
  Fixes #15751.
  
  Signed-off-by: Augustin Cavalier <waddlesplash@xxxxxxxxx>

                                     [ Pascal Abresch <nep@xxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53928
Commit:      7a8d5a2db3214be378c4450bd94e07db75d5e240
URL:         https://git.haiku-os.org/haiku/commit/?id=7a8d5a2db321
Author:      Pascal Abresch <nep@xxxxxxxxxxxxxx>
Date:        Sat Feb 29 18:59:58 2020 UTC
Committer:   Augustin Cavalier <waddlesplash@xxxxxxxxx>
Commit-Date: Sat Feb 29 23:30:40 2020 UTC

Ticket:      https://dev.haiku-os.org/ticket/15751

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 2 deletions(-)
src/servers/app/font/GlyphLayoutEngine.h | 5 +++--

----------------------------------------------------------------------------

diff --git a/src/servers/app/font/GlyphLayoutEngine.h 
b/src/servers/app/font/GlyphLayoutEngine.h
index 71d026cb3e..e488eb9604 100644
--- a/src/servers/app/font/GlyphLayoutEngine.h
+++ b/src/servers/app/font/GlyphLayoutEngine.h
@@ -335,8 +335,9 @@ GlyphLayoutEngine::_WriteLockAndAcquireFallbackEntry(
        // Try to get the glyph from the fallback fonts
        while (fallbacks[i] != NULL) {
                if (gFontManager->Lock()) {
-                       FontStyle* fallbackStyle = 
gFontManager->GetStyleByIndex(
-                               fallbacks[i], 0);
+                       FontStyle* fallbackStyle = gFontManager->GetStyle(
+                               fallbacks[i], font.Style());
+
                        if (fallbackStyle != NULL) {
                                ServerFont fallbackFont(*fallbackStyle, 
font.Size());
                                gFontManager->Unlock();


Other related posts:

  • » [haiku-commits] haiku: hrev53928 - src/servers/app/font - waddlesplash