summaryrefslogtreecommitdiff
path: root/accessible
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@protonmail.com>2023-04-04 21:48:39 +0800
committerJob Bautista <jobbautista9@protonmail.com>2023-04-05 21:22:17 +0800
commit57ef40f7833c28fc4d6ad6b2903ca9f2f112b7a2 (patch)
treebe0981dde97b73c5a6d93e2ddf2bf7b72ce1e641 /accessible
parent3122de954751fe8df9a5fb786e5f8089ce778d9b (diff)
downloaduxp-57ef40f7833c28fc4d6ad6b2903ca9f2f112b7a2.tar.gz
Issue #2191 - Remove as much old fontconfig support as needed for Harfbuzz 7.1.0 update.
Based on Mozilla bugs 1119128, 1285533, and 1421964. gfx.font_rendering.fontconfig.fontlist.enabled is no longer available. gfxFontconfigUtils.h still exists, and will be removed in another commit. Just need more research on bug 1385029. Tag #1862
Diffstat (limited to 'accessible')
-rw-r--r--accessible/base/TextAttrs.cpp34
1 files changed, 8 insertions, 26 deletions
diff --git a/accessible/base/TextAttrs.cpp b/accessible/base/TextAttrs.cpp
index 0f9e4f6fea..a03730ad76 100644
--- a/accessible/base/TextAttrs.cpp
+++ b/accessible/base/TextAttrs.cpp
@@ -18,10 +18,6 @@
#include "mozilla/AppUnits.h"
#include "mozilla/gfx/2D.h"
-#if defined(MOZ_WIDGET_GTK)
-#include "gfxPlatformGtk.h" // xxx - for UseFcFontList
-#endif
-
using namespace mozilla;
using namespace mozilla::a11y;
@@ -653,28 +649,14 @@ TextAttrsMgr::FontWeightTextAttr::
if (font->IsSyntheticBold())
return 700;
- bool useFontEntryWeight = true;
-
- // Under Linux, when gfxPangoFontGroup code is used,
- // font->GetStyle()->weight will give the absolute weight requested of the
- // font face. The gfxPangoFontGroup code uses the gfxFontEntry constructor
- // which doesn't initialize the weight field.
-#if defined(MOZ_WIDGET_GTK)
- useFontEntryWeight = gfxPlatformGtk::UseFcFontList();
-#endif
-
- if (useFontEntryWeight) {
- // On Windows, font->GetStyle()->weight will give the same weight as
- // fontEntry->Weight(), the weight of the first font in the font group,
- // which may not be the weight of the font face used to render the
- // characters. On Mac, font->GetStyle()->weight will just give the same
- // number as getComputedStyle(). fontEntry->Weight() will give the weight
- // of the font face used.
- gfxFontEntry *fontEntry = font->GetFontEntry();
- return fontEntry->Weight();
- } else {
- return font->GetStyle()->weight;
- }
+ // On Windows, font->GetStyle()->weight will give the same weight as
+ // fontEntry->Weight(), the weight of the first font in the font group,
+ // which may not be the weight of the font face used to render the
+ // characters. On Mac, font->GetStyle()->weight will just give the same
+ // number as getComputedStyle(). fontEntry->Weight() will give the weight
+ // of the font face used.
+ gfxFontEntry *fontEntry = font->GetFontEntry();
+ return fontEntry->Weight();
}
////////////////////////////////////////////////////////////////////////////////