I am having a hard time figuring out how can pango-viewer be installed in Debian.
As far as I can see, Debian only has in its repositories pago libraries and not pango-viewer, if I understand correctly is essential to know what fonts Weasyprint can use.
Can anyone please tip me on what would be the best way to have pango-viewer running on Debian Jessie?
Thanks!
¯_(ツ)_/¯
@SimonSapin does that mean that I have to compile pango-viewer from source?
It means that I don’t know.
For what it’s worth, I’ve only suggested pango-viewer in the past as a debugging tool in order to convince issue reporters that their issue is not a bug in WeasyPrint. (Other than the bug "someone someday should rewrite all of WeasyPrint’s text handling to use some lower-level API than PangoLayout.) I don’t think you actually need it, if you take my word or convince yourself by reading the source that WeasyPrint does nothing with the list of family names from font-family property (parsed per CSS) than join it with commas and call pango_font_description_set_family.
unhhg... i see, but how do we know what fonts are available for Weasyprint to use? E.g. are the fonts its ~/.fonts available to it?
I am sorry for the naive questions. I am quite a newbie. For month I have been struggling to find good html to print solution and finding Weasyprint was quite something! now in the middle of project trying to produce a book from a wiki and needing to get most issues working :P will let you know when it becomes completed.
unhhg... i see, but how do we know what fonts are available for Weasyprint to use? E.g. are the fonts its ~/.fonts available to it?
Honestly I don’t know, other than that Pango uses fontconfig on Linux to find fonts, and dealing with fontconfig’s configuration. If you want to list all available fonts, there may be a fontconfig command doing that. If all you care about is using a particular .ttf file in WeasyPrint, copying it to ~/.fonts is probably a good start.
@liZe may have more suggestions.
Once again, our favourite search engine will help us finding our way in the maze:
So, to know the fonts available for WeasyPrint, we need to find the fonts available for fontconfig. Quite easy, the Wikipedia page for fontconfig gives us a wonderful list of command-line utilities, with the very useful fc-list and fc-match.
yes. sounds pretty logic. I'll give it a try.
btw @liZe answer sounds like a good addition to the weasyprint documentation for the section fonts.
thanks!
btw @liZe answer sounds like a good addition to the weasyprint documentation for the section fonts.
thanks!
Good idea.