On 2013/01/18 23:20:14, Steve VanDeBogart wrote: NAK, this isn't a good fix for https://codereview.appspot.com/7127056/ . ...
12 years, 5 months ago
(2013-01-22 14:37:18 UTC)
#2
On 2013/01/18 23:20:14, Steve VanDeBogart wrote:
NAK, this isn't a good fix for https://codereview.appspot.com/7127056/ . We need
to make sure we don't crash in general when drawXXXText is called with glyph
encoding and some or all of the glyphs are not in the font. While this was
exposed by pdfs and skps, neither pdf nor pictures are the place to try to
handle this.
Does this only get triggered when we're using SKPs, or is it possible for the ...
12 years, 5 months ago
(2013-01-22 15:08:46 UTC)
#3
Does this only get triggered when we're using SKPs, or is it possible for the
caller to generate this just by drawing into a PDF device? Does the printf need
to be .skp specific?
How often will that printf appear? Once per draw? Once per bad glyph? Does it
need to be in release code, or just debug code?
This should only happen with SKP playback. The code path I've modified in this CL ...
12 years, 5 months ago
(2013-01-22 18:50:47 UTC)
#4
This should only happen with SKP playback.
The code path I've modified in this CL is only hit when we've successfully drawn
text, but the max glyph id of the font has gotten smaller when we try to
actually emit the PDF. i.e. it requires the font file to change between drawing
and and writing the pdf out. As far as I know, this is only possible with SKP
playback.
The print out is there to be helpful - we don't have to have it, or can make it
debug only. As is, it will happen once per font per PDF output.
On 2013/01/22 15:08:46, reed1 wrote:
> Does this only get triggered when we're using SKPs, or is it possible for the
> caller to generate this just by drawing into a PDF device? Does the printf
need
> to be .skp specific?
>
> How often will that printf appear? Once per draw? Once per bad glyph? Does it
> need to be in release code, or just debug code?
On 2013/01/22 14:37:18, bungeman wrote:
> NAK, this isn't a good fix for https://codereview.appspot.com/7127056/ . We
need
> to make sure we don't crash in general when drawXXXText is called with glyph
> encoding and some or all of the glyphs are not in the font. While this was
> exposed by pdfs and skps, neither pdf nor pictures are the place to try to
> handle this.
I agree that we shouldn't crash if we draw a glyph id above font.num_glyphs, but
that's not what this change is about.
Issue 7128058: [PDF] Detect and handle font mismatches triggered by .skp files.
(Closed)
Created 12 years, 5 months ago by Steve VanDeBogart
Modified 12 years, 5 months ago
Reviewers: edisonn, bungeman, reed1
Base URL: https://skia.googlecode.com/svn/trunk
Comments: 0