This repository has been archived by the owner on Aug 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport Qt patch for fixing font weights on macOS mojave
- Loading branch information
1 parent
18a97e9
commit 3a421d8
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- ./qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm.orig 2018-10-18 10:36:55.016457121 +0530 | ||
+++ ./qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm 2018-10-18 10:37:26.469615885 +0530 | ||
@@ -300,9 +300,9 @@ static void getFontDescription(CTFontDes | ||
|
||
if (styles) { | ||
if (CFNumberRef weightValue = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontWeightTrait)) { | ||
- float normalizedWeight; | ||
- if (CFNumberGetValue(weightValue, kCFNumberFloatType, &normalizedWeight)) | ||
- fd->weight = QCoreTextFontEngine::qtWeightFromCFWeight(normalizedWeight); | ||
+ double normalizedWeight; | ||
+ if (CFNumberGetValue(weightValue, kCFNumberFloat64Type, &normalizedWeight)) | ||
+ fd->weight = QCoreTextFontEngine::qtWeightFromCFWeight(float(normalizedWeight)); | ||
} | ||
if (CFNumberRef italic = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontSlantTrait)) { | ||
double d; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters