Gitea 1.5.0 crippled diff file font rendering #2206

Closed
opened 2025-11-02 04:27:07 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @tgurr on GitHub (Aug 16, 2018).

  • Gitea version (or commit ref): 1.5.0
  • Git version: 2.18.0
  • Operating system: Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
  • Log gist:

Description

Since gitea 1.5.0 the font rendering for the diffs are crippled when viewing them with either Firefox or Chrome on Linux (see attached screenshot). The problem doesn't seem to appear with Firefox or Chrome on Windows and I don't have another distribution to test with so it might be some local problems involved. However I can't remember having this problem with the previous version 1.4.3. And I also didn't find any configuration for being able to adjust the fonts used for rendering the diffs. Also I didn't experience font rendering issues on any other websites yet.

Screenshots

gitea_diff_rendering

Originally created by @tgurr on GitHub (Aug 16, 2018). - Gitea version (or commit ref): 1.5.0 - Git version: 2.18.0 - Operating system: Linux - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (https://try.gitea.io/davidak/nixpkgs/commit/b7e50d52f018d0670614a58851b4fc2c0f93818b) - [ ] No - [ ] Not relevant - Log gist: ## Description Since gitea 1.5.0 the font rendering for the diffs are crippled when viewing them with either Firefox or Chrome on Linux (see attached screenshot). The problem doesn't seem to appear with Firefox or Chrome on Windows and I don't have another distribution to test with so it might be some local problems involved. However I can't remember having this problem with the previous version 1.4.3. And I also didn't find any configuration for being able to adjust the fonts used for rendering the diffs. Also I didn't experience font rendering issues on any other websites yet. ## Screenshots ![gitea_diff_rendering](https://user-images.githubusercontent.com/414984/44207757-9692c900-a15e-11e8-90f8-1e437240d958.png)
GiteaMirror added the topic/uitype/bug labels 2025-11-02 04:27:07 -06:00
Author
Owner

@jonasfranz commented on GitHub (Aug 18, 2018):

I can reproduce that also with Firefox + Chrome on macOS

@jonasfranz commented on GitHub (Aug 18, 2018): I can reproduce that also with Firefox + Chrome on macOS
Author
Owner

@jac1013 commented on GitHub (Sep 3, 2018):

I can confirm this is happening, if you go to the CSS directly and "turn off" the font CSS applied to the diff tool it solves the problem, also, if the css is only 12px monospace; it also works, it seems like Consolas and the other fallback fonts are causing something weird to happen in Linux.

This is the real CSS:

font: 12px Consolas,"Liberation Mono",Menlo,Courier,monospace;

@jac1013 commented on GitHub (Sep 3, 2018): I can confirm this is happening, if you go to the CSS directly and "turn off" the font CSS applied to the diff tool it solves the problem, also, if the css is only `12px monospace;` it also works, it seems like `Consolas` and the other fallback fonts are causing something weird to happen in Linux. This is the real CSS: `font: 12px Consolas,"Liberation Mono",Menlo,Courier,monospace;`
Author
Owner

@tonivj5 commented on GitHub (Sep 9, 2018):

I can't fix the problem changing the font, @jac1013. I have fixed the issue adding this css rule:

table {
    border-collapse: collapse;
}
@tonivj5 commented on GitHub (Sep 9, 2018): I can't fix the problem changing the font, @jac1013. I have fixed the issue adding this css rule: ```css table { border-collapse: collapse; } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2206