[PDF] (regression) Update font if size changes.

Review URL: http://codereview.appspot.com/4532044

git-svn-id: http://skia.googlecode.com/svn/trunk@1279 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
vandebo@chromium.org 2011-05-09 17:36:36 +00:00
parent 69d4ca32ec
commit 339ac3d0a7

View File

@ -1216,6 +1216,7 @@ void SkPDFDevice::populateGraphicStateEntryFromPaint(
void SkPDFDevice::updateFont(const SkPaint& paint, uint16_t glyphID) {
SkTypeface* typeface = paint.getTypeface();
if (fCurrentContentEntry->fState.fFont == NULL ||
fCurrentContentEntry->fState.fTextSize != paint.getTextSize() ||
!fCurrentContentEntry->fState.fFont->hasGlyph(glyphID)) {
int fontIndex = getFontResourceIndex(typeface, glyphID);
fCurrentContentEntry->fContent.writeText("/F");