[Poppler-bugs] [Bug 105772] [PATCH] Arthur support for Type3 fonts

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 5 22:01:21 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=105772

--- Comment #5 from Albert Astals Cid <aacid at kde.org> ---
(In reply to oliver.sander from comment #4)
> >> - Why white?  Why not any other color?
> > Because the code is buggy 
> 
> I'd happily try to fix the code, if somebody tells me what the startPage
> method is supposed to do.

To be honest i don't think there's a definition of what is supposed to do other
than "do the things that you need to do when starting a new page"

> 
> >> - Apparently the method is rarely called: The renderToArthur method
> >>   in file poppler-page.cc, for example, does not call it.
> 
> > Are you sure about that? renderToArthur calls displayPageSlice that calls displaySlice that calls createGfx that calls Gfx constructor with pagenum that calls startPage
> 
> Well, I said 'rarely', not 'never'. :-)  

I don't understand this, you said "renderToArthur method in file
poppler-page.cc, for example, does not call it." and i showed you that it does.

> In particular, I had to make the
> renderToImage method fill the page with the page color, to get a background
> at all (in 7e844eae94bc4eda1c6dcc3460840b25f4ca7898) The code in startPage
> didn't seem to have any effect.  But I readily admit that I was never quite
> sure what the proper location is for the code that initializes the page
> background.
> 
> Tangentially related: What is the precise meaning of the IgnorePaperColor
> flag?  Does it mean 'make the background transparent'?

Yes, i'd say you awnt to hide that tmpimg.fill(bgColor); inside a check for not
IgnorePaperColor

> >> - Most importantly: We want to use ArthurOutputDev to render type3
> >>  glyphs.  But they should have a transparent background, or rather,
> >>  no background at all.
> 
> > I don't understand this reasoning.
> 
> The type3 code in the attached patch is partially cargo-culted from the
> cairo backend.  It creates new ArthurOutputDev and Gfx objects for each
> glyph, and uses them to render a single glyph into a QPicture.  The cairo
> backend calls startPage on the output device, which in the case of the
> ArthurOutputDev leads to the effect that each glyph has a white rectangular
> background.  You will notice that when rendering type3 text on a non-white
> background.

I see.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20180405/d44147eb/attachment.html>


More information about the Poppler-bugs mailing list