Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1954106 Details for
Bug 2179854
Qt 5 render the Bold style CJK character very thick with Noto CJK variable fonts
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Draft patch for the bold style issue v2
qtbase-fix-bold-style-font-v2.patch (text/plain), 3.40 KB, created by
Peng Wu
on 2023-03-28 08:55:29 UTC
(
hide
)
Description:
Draft patch for the bold style issue v2
Filename:
MIME Type:
Creator:
Peng Wu
Created:
2023-03-28 08:55:29 UTC
Size:
3.40 KB
patch
obsolete
>Switch to use FcFontSort function instead of FcFontMatch function > >Use the embolden value from fontconfig > > >Index: qtbase-everywhere-src-5.15.8/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp >=================================================================== >--- qtbase-everywhere-src-5.15.8.orig/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp >+++ qtbase-everywhere-src-5.15.8/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp >@@ -973,12 +973,35 @@ void QFontconfigDatabase::setupFontEngin > if (fontDef.pixelSize > 0.1) > FcPatternAddDouble(pattern, FC_PIXEL_SIZE, fontDef.pixelSize); > >- FcResult result; >- > FcConfigSubstitute(nullptr, pattern, FcMatchPattern); > FcDefaultSubstitute(pattern); > >- FcPattern *match = FcFontMatch(nullptr, pattern, &result); >+ FcResult result = FcResultMatch; >+ FcFontSet *fontSet = FcFontSort(nullptr,pattern,FcFalse,nullptr,&result); >+ >+ FcPattern *match = NULL; >+ >+ if (fontSet) { >+ if (fontSet->nfont) >+ match = fontSet->fonts[0]; >+ >+ for (int i = 0; i < fontSet->nfont; i++) { >+ int value = 0; >+ if (FcPatternGetInteger(fontSet->fonts[i], FC_INDEX, 0, &value) != FcResultMatch) >+ continue; >+ >+ if (fid.index == value) { >+ match = fontSet->fonts[i]; >+ break; >+ } >+ } >+ >+ if (match) >+ match = FcFontRenderPrepare(nullptr, pattern, match); >+ >+ FcFontSetDestroy(fontSet); >+ } >+ > if (match) { > engine->setDefaultHintStyle(defaultHintStyleFromMatch((QFont::HintingPreference)fontDef.hintingPreference, match, useXftConf)); > >@@ -986,6 +1009,10 @@ void QFontconfigDatabase::setupFontEngin > if (FcPatternGetBool(match, FC_AUTOHINT,0, &fc_autohint) == FcResultMatch) > engine->forceAutoHint = fc_autohint; > >+ FcBool embolden = false; >+ if (FcPatternGetBool(match, FC_EMBOLDEN, 0, &embolden) == FcResultMatch) >+ engine->embolden = embolden; >+ > #if defined(FT_LCD_FILTER_H) > int lcdFilter; > if (FcPatternGetInteger(match, FC_LCD_FILTER, 0, &lcdFilter) == FcResultMatch) >Index: qtbase-everywhere-src-5.15.8/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp >=================================================================== >--- qtbase-everywhere-src-5.15.8.orig/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp >+++ qtbase-everywhere-src-5.15.8/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp >@@ -747,6 +747,7 @@ bool QFontEngineFT::init(FaceId faceId, > obliquen = true; > FT_Set_Transform(face, &matrix, nullptr); > freetype->matrix = matrix; >+#if !defined(Q_OS_LINUX) > // fake bold > if ((fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face) && !qEnvironmentVariableIsSet("QT_NO_SYNTHESIZED_BOLD")) { > if (const TT_OS2 *os2 = reinterpret_cast<const TT_OS2 *>(FT_Get_Sfnt_Table(face, ft_sfnt_os2))) { >@@ -754,6 +755,7 @@ bool QFontEngineFT::init(FaceId faceId, > embolden = true; > } > } >+#endif > // underline metrics > line_thickness = QFixed::fromFixed(FT_MulFix(face->underline_thickness, face->size->metrics.y_scale)); > QFixed center_position = QFixed::fromFixed(-FT_MulFix(face->underline_position, face->size->metrics.y_scale));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2179854
:
1952248
|
1952660
|
1953537
|
1953864
|
1954106
|
1954381
|
1954384