зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1598063 - Don't hide text styled with a pending user font when drawing canvas text, just draw with fallback instead. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D55707 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a7aa37a16f
Коммит
1598ebe8a8
|
@ -3493,9 +3493,10 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor
|
|||
} else {
|
||||
flags &= ~gfx::ShapedTextFlags::TEXT_IS_RTL;
|
||||
}
|
||||
mTextRun =
|
||||
mFontgrp->MakeTextRun(aText, aLength, mDrawTarget, mAppUnitsPerDevPixel,
|
||||
flags, nsTextFrameUtils::Flags(), mMissingFonts);
|
||||
mTextRun = mFontgrp->MakeTextRun(
|
||||
aText, aLength, mDrawTarget, mAppUnitsPerDevPixel, flags,
|
||||
nsTextFrameUtils::Flags::DontSkipDrawingForPendingUserFonts,
|
||||
mMissingFonts);
|
||||
}
|
||||
|
||||
virtual nscoord GetWidth() override {
|
||||
|
|
|
@ -183,7 +183,9 @@ gfxTextRun::gfxTextRun(const gfxTextRunFactory::Parameters* aParams,
|
|||
AccountStorageForTextRun(this, 1);
|
||||
#endif
|
||||
|
||||
mSkipDrawing = mFontGroup->ShouldSkipDrawing();
|
||||
mSkipDrawing =
|
||||
mFontGroup->ShouldSkipDrawing() &&
|
||||
!(aFlags2 & nsTextFrameUtils::Flags::DontSkipDrawingForPendingUserFonts);
|
||||
}
|
||||
|
||||
gfxTextRun::~gfxTextRun() {
|
||||
|
|
|
@ -35,7 +35,11 @@ class nsTextFrameUtils {
|
|||
HasTab = 0x01,
|
||||
// the original text has at least one soft hyphen character
|
||||
HasShy = 0x02,
|
||||
UnusedFlags = 0x0C,
|
||||
UnusedFlags = 0x04,
|
||||
|
||||
// Flag used in textrun construction to *prevent* hiding of fallback text
|
||||
// for pending user-fonts (used for Canvas2d text).
|
||||
DontSkipDrawingForPendingUserFonts = 0x08,
|
||||
|
||||
// The following flags are set by nsTextFrame
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче