The line number isn't always aligned with the source code

藍挺瑋 lantw44 at gmail.com
Tue May 28 18:38:24 CEST 2019


I found the problem on my cgit site: 
https://www.tfcis.org/~lantw44/cgit/configfile/tree/README?h=bash_include-20160928

I attached three screenshots in this message. Firefox and Chromium are
unable to keep the line number and the source code aligned, but
Epiphany can.

The default monospace font on my system is 'DejaVu Sans Mono'. Since
DejaVu fonts don't include Chinese characters required to show the
page, the browser picks 'Source Han Sans TW' as the secondary font,
which has different height with DejaVu, causing line number to be
misaligned. Is there a way to fix the problem and make it work on all
browsers?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgit-screenshot-firefox.png
Type: image/png
Size: 59430 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190529/0c4cbb48/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgit-screenshot-chromium.png
Type: image/png
Size: 76403 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190529/0c4cbb48/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgit-screenshot-epiphany.png
Type: image/png
Size: 79512 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190529/0c4cbb48/attachment-0005.png>


More information about the CGit mailing list