font "Linux Libertine" causes scrambled output

38 views
Skip to first unread message

knowname

unread,
Sep 22, 2017, 8:57:18 AM9/22/17
to Prawn
The following Code creates a PDF file hello.pdf (as attached) with text which looks good in most viewers. 
But if you try to print it out or look at it with "gs" the Result looks like in the screenshot i attached.

Anybody an idea?

cheers Phil

require "prawn"


Prawn::Document.generate("hello.pdf") do
    font_families
.update("Linux Libertine" => {
       
:normal => "/path/to/libertine/LinLibertine_Rah.ttf",
       
:italic => "/path/to/libertine/LinLibertine_RIah.ttf",
       
:bold   => "/path/to/libertine/LinLibertine_RBah.ttf"
   
})
   
    font
"Linux Libertine"
    text
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
end


Installed prawn version: 
Screenshot of scrambled output.png
hello.pdf

Thomas Leitner

unread,
Sep 22, 2017, 11:19:44 AM9/22/17
to prawn...@googlegroups.com
On 2017-09-22 02:31 -0700 knowname wrote:
> The following Code creates a PDF file hello.pdf (as attached) with
> text which looks good in most viewers.
> But if you try to print it out or look at it with "gs" the Result
> looks like in the screenshot i attached.
>
> Anybody an idea?

It looks alright on my Linux system, using Gnome Document Viewer, gv or
gs.

-- Thomas

Paulo Fidalgo

unread,
Sep 22, 2017, 4:18:07 PM9/22/17
to prawn...@googlegroups.com
Even with Firefox with pdf.js is looking good!


--
You received this message because you are subscribed to the Google Groups "Prawn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prawn-ruby+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

knowname

unread,
Oct 16, 2017, 8:19:51 AM10/16/17
to Prawn
May i ask which linux system and gs version you are using?

Thomas Leitner

unread,
Oct 16, 2017, 11:07:55 AM10/16/17
to prawn...@googlegroups.com
On 2017-10-16 05:19 -0700 knowname wrote:
> May i ask which linux system and gs version you are using?

I'm running Ubuntu 17.04 with ghostscript version 9.19~dfsg+1-0ubuntu7.

-- Thomas
Reply all
Reply to author
Forward
0 new messages