From f3bcaf9f88aad2c423ebcd61121562f9834187d4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 17:11:27 +0200 Subject: Merging upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- gfx/thebes/gfxDWriteFonts.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gfx/thebes/gfxDWriteFonts.cpp') diff --git a/gfx/thebes/gfxDWriteFonts.cpp b/gfx/thebes/gfxDWriteFonts.cpp index fa6bc48cf9..a77dfee6be 100644 --- a/gfx/thebes/gfxDWriteFonts.cpp +++ b/gfx/thebes/gfxDWriteFonts.cpp @@ -96,11 +96,15 @@ gfxDWriteFont::gfxDWriteFont(const RefPtr& aUnscaledFont, case 0: // never use the DWrite simulation mApplySyntheticBold = true; break; - case 1: // use DWrite simulation for installed fonts but not webfonts - mApplySyntheticBold = aFontEntry->mIsDataUserFont; + case 1: // use DWrite simulation for installed fonts except COLR fonts, + // but not webfonts + mApplySyntheticBold = + aFontEntry->mIsDataUserFont || + aFontEntry->HasFontTable(TRUETYPE_TAG('C', 'O', 'L', 'R')); break; - default: // always use DWrite bold simulation - // the flag is initialized to false in gfxFont + default: // always use DWrite bold simulation, except for COLR fonts + mApplySyntheticBold = + aFontEntry->HasFontTable(TRUETYPE_TAG('C', 'O', 'L', 'R')); break; } } -- cgit v1.2.3