View Single Post
Old 10-26-2024, 02:30 AM   #5
Yihan-labs
Junior Member
Yihan-labs began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2024
Device: reMarkable
Thank you for your reply.
After some searching, I found this gnome thread also listing a similar issue: https://gitlab.gnome.org/GNOME/gnome.../-/issues/7960

Quote:
Noto Sans Mono CJK must not be doing that properly. We're probably not going to change Sigil to overcome a font's shortcomings by trying to parse file names.
Quote:
The actual font family name or file name is not sufficient.
I see that it's not a good idea to filter fonts by name and it's not Sigil's responsibility to determine if a font is monospaced. Both the "fc-list :mono" and "pango-list" determine monospace by checking a spacing property of 100 in fc-scan, but this does not suit the case of Noto Sans Mono CJK because the Kanji characters are aligned to the width of two ASCII characters. As shown below:


The text is going to look terrible if we change the font to fit the "spacing property of 100" criteria AND it is going to take a long time for people to change this criterion because of how the open-source community works.

It could be helpful to make a toggle for the mono font filter, as suggested in the gnome thread above. This will also solve the issue in this thread of 2019: https://www.mobileread.com/forums/sh...d.php?t=320386. But I understand that this issue is not very urgent, and the developer's time is limited.

I spent some time finding the correct field for the font family settings in the sigil.ini, it is under a different name compared to the 2019 thread above, the names are as follows:
Code:
$ ack font '~/.var/app/com.sigil_ebook.Sigil/data/sigil-ebook/sigil/'
~/.var/app/com.sigil_ebook.Sigil/data/sigil-ebook/sigil/sigil.ini
516:cv_dark_font_family_standard=Nimbus Mono PS
517:cv_dark_font_size=14
537:original_ui_font="Cantarell,11,-1,5,50,0,0,0,0,0"
542:preview_font_family_sans_serif=C059
543:preview_font_family_serif=Times New Roman
544:preview_font_family_standard=C059
545:preview_font_size=16
Current solution:
  1. Select Edit > Preferences > Open Preferences Location.
  2. Close Sigil.
  3. Open sigil.ini
  4. Search and replace the following entry:
    Code:
    cv_dark_font_family_standard=Noto Sans Mono CJK TC
  5. Save sigil.ini

Now the text looks much better, before this the code view had different line spacing, is like a giant building with each window having a different width and height.
Yihan-labs is offline   Reply With Quote