mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 588731 - ensure correct font is selected in the DC when getting glyph metrics. r=jdaggett a=blocking2.0
This commit is contained in:
parent
db6beae972
commit
308278b403
@ -484,8 +484,11 @@ gfxGDIFont::GetHintedGlyphWidth(gfxContext *aCtx, PRUint16 aGID)
|
||||
return width;
|
||||
}
|
||||
|
||||
DCFromContext dc(aCtx);
|
||||
AutoSelectFont fs(dc, GetHFONT());
|
||||
|
||||
int devWidth;
|
||||
if (GetCharWidthI(DCFromContext(aCtx), aGID, 1, NULL, &devWidth)) {
|
||||
if (GetCharWidthI(dc, aGID, 1, NULL, &devWidth)) {
|
||||
// ensure width is positive, 16.16 fixed-point value
|
||||
width = (devWidth & 0x7fff) << 16;
|
||||
mGlyphWidths.Put(aGID, width);
|
||||
|
Loading…
Reference in New Issue
Block a user