Drawing fake bold text, line and normal text made normal text bolder on PDF.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 7 Feb 2014 19:39:57 +0000 (19:39 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 7 Feb 2014 19:39:57 +0000 (19:39 +0000)
commitb000d76af4de735a233e64b7be68cee8a5a8f8dc
treee82f39da5251d64906fc88f3886e6f7269406074
parent244b2884318eb65f0c56d7d9e61a157fa96e4b71
Drawing fake bold text, line and normal text made normal text bolder on PDF.

When PDF uses fake bold text, it uses stroke and fill for the
text. After that, line is drawn. It creates new ContextEntry which
GraphicStateEntry has 0 fTextScaleX. Since fTextScaleX is 0,
GraphicStackState::updateDrawingState() doesn't update text fill mode or
the PDF page. When the normal text is drawn, it reuse the line's
ContextEntry because GraphicStateEntry::compareInitialState() returns
true. However, since the reused GraphicsStateEntry's fTextScaleX is 0,
the text fill mode is not updated to fill, and the text is drawn in
stroke and fill mode.

When the fTextScaleX is changed, we should not reuse GraphicStateEntry
even if ether of fTextScaleX is 0.

BUG=skia:2132
R=reed@google.com, vandebo@chromium.org, bungeman@google.com

Author: yuki.sekiguchi@access-company.com

Review URL: https://codereview.chromium.org/137923005

git-svn-id: http://skia.googlecode.com/svn/trunk@13369 2bbb7eff-a529-9590-31e7-b0007b416f81
AUTHORS
src/pdf/SkPDFDevice.cpp