mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
Bug 698652: Ignore the user's minimum font size when drawing to canvas. r=dbaron
This commit is contained in:
parent
557449288e
commit
9d1717a44d
@ -2548,7 +2548,12 @@ nsCanvasRenderingContext2D::SetFont(const nsAString& font)
|
||||
// use CSS pixels instead of dev pixels to avoid being affected by page zoom
|
||||
const PRUint32 aupcp = nsPresContext::AppUnitsPerCSSPixel();
|
||||
// un-zoom the font size to avoid being affected by text-only zoom
|
||||
const nscoord fontSize = nsStyleFont::UnZoomText(parentContext->PresContext(), fontStyle->mFont.size);
|
||||
//
|
||||
// Purposely ignore the font size that respects the user's minimum
|
||||
// font preference (fontStyle->mFont.size) in favor of the
|
||||
// computed size (fontStyle->mSize). See
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=698652.
|
||||
const nscoord fontSize = nsStyleFont::UnZoomText(parentContext->PresContext(), fontStyle->mSize);
|
||||
|
||||
bool printerFont = (presShell->GetPresContext()->Type() == nsPresContext::eContext_PrintPreview ||
|
||||
presShell->GetPresContext()->Type() == nsPresContext::eContext_Print);
|
||||
|
@ -2759,7 +2759,12 @@ nsCanvasRenderingContext2DAzure::SetFont(const nsAString& font)
|
||||
// use CSS pixels instead of dev pixels to avoid being affected by page zoom
|
||||
const PRUint32 aupcp = nsPresContext::AppUnitsPerCSSPixel();
|
||||
// un-zoom the font size to avoid being affected by text-only zoom
|
||||
const nscoord fontSize = nsStyleFont::UnZoomText(parentContext->PresContext(), fontStyle->mFont.size);
|
||||
//
|
||||
// Purposely ignore the font size that respects the user's minimum
|
||||
// font preference (fontStyle->mFont.size) in favor of the computed
|
||||
// size (fontStyle->mSize). See
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=698652.
|
||||
const nscoord fontSize = nsStyleFont::UnZoomText(parentContext->PresContext(), fontStyle->mSize);
|
||||
|
||||
bool printerFont = (presShell->GetPresContext()->Type() == nsPresContext::eContext_PrintPreview ||
|
||||
presShell->GetPresContext()->Type() == nsPresContext::eContext_Print);
|
||||
|
Loading…
x
Reference in New Issue
Block a user