mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 751129 - ensure the font list is updated if necessary before accessing metrics. r=roc
This commit is contained in:
parent
065e1ea766
commit
c48dacae61
@ -2972,6 +2972,7 @@ nsCanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
|
||||
processor.mPt.x -= anchorX * totalWidth;
|
||||
|
||||
// offset pt.y based on text baseline
|
||||
processor.mFontgrp->UpdateFontList(); // ensure user font generation is current
|
||||
NS_ASSERTION(processor.mFontgrp->FontListLength()>0, "font group contains no fonts");
|
||||
const gfxFont::Metrics& fontMetrics = processor.mFontgrp->GetFontAt(0)->GetMetrics();
|
||||
|
||||
|
@ -3282,6 +3282,7 @@ nsCanvasRenderingContext2DAzure::DrawOrMeasureText(const nsAString& aRawText,
|
||||
processor.mPt.x -= anchorX * totalWidth;
|
||||
|
||||
// offset pt.y based on text baseline
|
||||
processor.mFontgrp->UpdateFontList(); // ensure user font generation is current
|
||||
NS_ASSERTION(processor.mFontgrp->FontListLength()>0, "font group contains no fonts");
|
||||
const gfxFont::Metrics& fontMetrics = processor.mFontgrp->GetFontAt(0)->GetMetrics();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user