mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 619521 - Part 3: Send a notification for missing math fonts. r=jkitch
This commit is contained in:
parent
b77ae133f8
commit
b60cd30c4b
@ -13,6 +13,7 @@
|
||||
#include "nsTextFrameUtils.h"
|
||||
#include "nsFontMetrics.h"
|
||||
#include "nsDeviceContext.h"
|
||||
#include "nsUnicodeScriptCodes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@ -678,6 +679,9 @@ MathMLTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
|
||||
} else {
|
||||
// We fallback to the original character.
|
||||
ch2 = ch;
|
||||
if (aMFR) {
|
||||
aMFR->RecordScript(MOZ_SCRIPT_MATHEMATICAL_NOTATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "gfxMathTable.h"
|
||||
#include "nsUnicodeScriptCodes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
@ -1694,6 +1695,14 @@ nsMathMLChar::StretchInternal(nsPresContext* aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// We did not find a size variant or a glyph assembly to stretch this
|
||||
// operator. Verify whether a font with an OpenType MATH table is available
|
||||
// and record missing math script otherwise.
|
||||
gfxMissingFontRecorder* MFR = aPresContext->MissingFontRecorder();
|
||||
if (MFR && !fm->GetThebesFontGroup()->GetFirstMathFont()) {
|
||||
MFR->RecordScript(MOZ_SCRIPT_MATHEMATICAL_NOTATION);
|
||||
}
|
||||
|
||||
// stretchy character
|
||||
if (stretchy) {
|
||||
if (isVertical) {
|
||||
|
Loading…
Reference in New Issue
Block a user