[Poppler-bugs] [Bug 102290] [PATCH] Replace Splash font rendering by Qt font rendering

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 22 21:11:50 UTC 2017


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

--- Comment #8 from Adrian Johnson <ajohnson at redneon.com> ---
(In reply to oliver.sander from comment #6)
> BTW: My life would be much simpler if I knew what the parameters of the
> drawChar method are.  Right now I operate mainly by educated guesswork. 
> Could somebody please take the time and write down descriptions of what they
> are?  I'll gladly prepare a patch from any kind of description.  Thanks!

Have a look at the cairo backend code (CairoOutputDev and CairoFontEngine) as
it is doing a similar thing to what you are trying to do. ie drawing to an
external drawing API that has its own font support.

CharCode code, int nBytes, Unicode *u, int uLen

code is the character code in the content stream. This needs to be mapped back
to a glyph index. GfxFont has the code to do this. u is the UCS-4 mapping used
for text extraction (TextOutputDev). nBytes and ULen are the number of
character codes and unicode respectively.  You can ignore the unicode. Also the
unicode is not always valid so you can't use it for drawing.

I can't recall how all the x/y params work. Just copy what splash or cairo
backends are doing.

-- 
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/20170822/2833725d/attachment.html>


More information about the Poppler-bugs mailing list