Zim

Set print-to-browser font based on user preference

Bug #539386 reported by nomnex
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zim
Won't Fix
Wishlist
Unassigned

Bug Description

I have no programming knowledge, but I assume that Zim interprets the wiki-markup language of the text files and print the output using some templates (.xml or .css). I am not able to tailor a template for my needs at the current time.

My issue is about Asian language rendering in a browser when using a custom font. To illustrate my question, I post 3 print screens of a sample text I wrote in Zim; printed to browser; and exported to a HTML default template. Custom font setting: DejaVuSans Book, 12 pt

ps1. The Zim window
Roman and Japanese characters render correctly on screen

ps2. Function File > Print to browser
The FF browser does not print the custom font set in the zim Prefernce (DejaVuSans). It prints the default system font (Sans).
You can see that by comparing the Japanese sentence in the Zim windows (DejaVuSans) vs. the same sentence in the FF Browser.

ps3. Function Export > Output HTML > Template default
The HTML page omits the Japanese sentence. Only the Japanese title (formatted with Ctrl+3) is printed. Others changes have occurred when compared to the source (see: ps1) and the formatting is incorrect (font + font formatting)

Once again, my technical knowledge is fairly basic to troubleshoot such issue. the "Zim export function" (if it relies on HTML templates) seems limited to the system font or "Sans" font--on a Ubuntu Linux distribution

Is there a possibility to render correctly Asian characters using the Zim printing or exporting function? Eventually could it be a feature request?

@Jaap, thank you for your patience and kind answers. I gave Zim a thorough testing these 2 last days and I am almost done with my questions

Revision history for this message
nomnex (nomnex) wrote :
Revision history for this message
nomnex (nomnex) wrote :
Revision history for this message
nomnex (nomnex) wrote :
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Could you also attach the text file of the test page? I can't easily type japanese myself to test this ;)

Revision history for this message
nomnex (nomnex) wrote :

Sample uploaded

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

The font used in zim is not used when exporting HTML. Afraid the only way to fix this at this moment is tailoring the HTML template used for the "print to browser" feature. Will have to look at options to do that automatically.

The issue where the line with text disappears in the export I can not reproduce. I used the attached file and exported it, but I get the expected output. If you have additional information how to trigger this bug please let me know.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Set status to Medium with the eye on fixing at least the font issue.

If second issue can be reproduced, please open a separate bug report for tracking it.

Changed in zim:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
nomnex (nomnex) wrote :

fixing the font issue without user interaction (editing a template) would be nice.
I can't reproduce the missing line either when importing the sample "journal.txt".
will try again editing from scratch when I have some free time

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Updated title to reflect discussion.

summary: - Writing Asian Languages in Zim Issue
+ Set print-to-browser font based on user preference
Changed in zim:
importance: Medium → Wishlist
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Made bug #665099 a duplicate if this one. Note that it is formulated a bit wider to also include colors and other style elements.

tags: added: export papercut templates
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Moving this request to "Won't Fix", reason is that I don't want to spent more time on improving this feature. In that case rather have someone hack real printing support in. Also template editor now makes it easier to customize the print template.

Changed in zim:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.