List for cgit developers and users
 help / color / Atom feed
* The line number isn't always aligned with the source code
@ 2019-05-28 16:38 
  2019-05-28 16:51 ` 
  0 siblings, 1 reply; 2+ messages in thread
From:  @ 2019-05-28 16:38 UTC (permalink / raw)


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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* The line number isn't always aligned with the source code
  2019-05-28 16:38 The line number isn't always aligned with the source code 
@ 2019-05-28 16:51 ` 
  0 siblings, 0 replies; 2+ messages in thread
From:  @ 2019-05-28 16:51 UTC (permalink / raw)


> 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.

I can reproduce the issue.


> Is there a way to fix the problem and make it work on all
browsers?

I'm fairly sure the only way to fix the issue reliable is using a table
with one row per line. GitHub is using that approach while  both Gitlab and
Bitbucket are not.



>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190528/38c8d385/attachment.html>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28 16:38 The line number isn't always aligned with the source code 
2019-05-28 16:51 ` 

List for cgit developers and users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/cgit

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.cgit


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git