mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-15 20:09:18 -05:00
Switch font to Noto #3325
Closed
opened 2025-11-02 05:08:21 -06:00 by GiteaMirror
·
20 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.0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3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
type/proposal
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#3325
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xf- on GitHub (May 13, 2019).
Switch from Lato to Noto font.
Noto is one of the biggest fonts available and subsets should contain a lot languages (582).
Also Noto provides Noto Sans Mono (and Noto Mono)
Sponsored/maintained by Google to run applications around the world.
https://www.google.com/get/noto/
I opened a issue because i have no idea if it is worth the effort and will get merged.
@silverwind commented on GitHub (May 14, 2019):
I'm generally 👍 to this if we can cover all our supported languages with it. Better to have one unified font style across languages.
Looks like we just need to extract the woff/woff2 from these webfonts, weight 400, right?
https://fonts.google.com/specimen/Noto+Sans/
https://fonts.google.com/specimen/Noto+Sans+JP/
https://fonts.google.com/specimen/Noto+Sans+KR/
https://fonts.google.com/specimen/Noto+Sans+TC/
https://fonts.google.com/specimen/Noto+Sans+SC/
Maybe there is some tooling available to automatically build the font CSS and woff files for Noto for all languages.
@lafriks commented on GitHub (May 14, 2019):
I would also be ok with this font
@mrsdizzie commented on GitHub (May 14, 2019):
For reference these tools were helpful in showing some differences between the fonts (for certain ASCII characters anyway).
http://www.identifont.com/differences?first=Lato&second=Noto+Sans&q=Go
https://tiff.herokuapp.com
@xf- commented on GitHub (May 14, 2019):
Status
I tested a lot yesterday and replaced the font (branch on the fork...), but providing JP KR TC and SC maybe not so easy. The fonts are really large otf 4.3 MB and woff2 3.4 MB. All other languges are included in other file like latin, Cyrillic ...
It is possible, but 2 files (Regular,(?Semi)Bold) at 6.8 MB.
Monospaced
Monospaced is not that interesting. Works for code, but no italic and most developers prefer standard system font for code.
Current problem with Lato
Lato is included in index and lato-v14 is included semantic ui as font-face.
My favorite solution so far
@silverwind commented on GitHub (May 14, 2019):
But wouldn't browsers be smart enough to only download the font if they encounter a glyph from it (using CSS
unicode-range)? https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range says "If the page doesn't use any character in this range, the font is not downloaded; if it uses at least one, the whole font is downloaded"Agree, I also prefer a system font stack for monospace.
I'd have no issues using
!importantto overrule that.Ideally, icons should be inline SVG, icon fonts are just a dirty hack from the past for browsers without SVG support (all browsers since IE9 do).
@xf- commented on GitHub (May 14, 2019):
@silverwind yes the browser is smart enough, but 1 font file has 3.4 MB for JP SC... Like a really large Icon font. My "All Noto" download had > 1 GB font files. That means you incease download for JP or SC TH by nearly 7 MB without italic and trigger a complete repaint.
About partial download. No clue if you can really define the information that well. A lot of user content
I would replace it in semantic ui css (first file loaded) and initially a Google Font import is in git history. Was already modified. Also use preload in header.
I personally like icon fonts. Better to control (position inline) compared to background-image svg, easy to change color and apply. Inline in CSS or webpage? Supixel, hinting.. options are really good in fonts. for small icons. Logos are SVGs.
@silverwind commented on GitHub (May 14, 2019):
Ugh, yes that seems quite big. Probably not a great idea to include it. Maybe @zeripath has a opinion.
Inline in HTML of course, anything else is a hack. Some tooling will be needed so that our template code can emit SVGs and I fear some major hacks to semantic-ui might be necessary to make it works, so probably not that great of an option unless we ditch semantic.
@xf- commented on GitHub (May 14, 2019):
@silverwind you are on discord?
I prefer inline aswell for logos/larger icons, but small icons (to add some visual) are really nice with font. You can add icon in docu inline and no c&p the svg. Even with "use" imports from one svg.
@silverwind commented on GitHub (May 14, 2019):
Not on discord (yet), I'm afraid. Keep the icon fonts for now. We can probably switch to SVG icons later when we have a CSS framework that supports them (bulma does).
@zeripath commented on GitHub (May 15, 2019):
Although I like Noto, I thought if we were going to remove Lato we were going to move to a native stack? Noto might make sense as a fall through though - if that's possible without browsers downloading the fonts unnecessarily.
@xf- commented on GitHub (May 15, 2019):
@zeripath like github? i like the idea, but maybe some "bug" reports about alignment of icons.
@silverwind i never seen Bulma before and i looked into repo and syntax without braces in sass is really strange & uses hsl (+ hex + rgba) colors. Also in the hand of a single Maintainer (no Team or Organization). I normally use Bootstrap and import needed modules like Grid, maybe cards, responsive images. I prefer it, because a lot of external stuff uses the same classes or provide a bootstrap version. Of course you need to adjust some variables.
Looks like on Bulma you should to import all modules. Bootstrap
@silverwind commented on GitHub (May 15, 2019):
Actually, I think I'd prefer a completely native stack too, especially given that we can not properly cover the asian fonts without a big load performance regression.
@xf- It was brought up in https://github.com/go-gitea/gitea/issues/5937 as a replacement for the ageing semantic-ui. Bootstrap 4 might also be a a valid option for a replacement framework, actually. I agree it might see better long-term support than Bulma.
@lafriks commented on GitHub (May 15, 2019):
Idea behind Bulma is to use flex for layouts that make it a lot more cleaner and lighter than bootsrtap
@silverwind commented on GitHub (May 15, 2019):
Yeah, Bulma is built around Flexbox while it's optional in Bootstrap. Not saying that Flexbox is a cure-all, but it's a step in the right direction.
@xf- commented on GitHub (May 15, 2019):
@silverwind @lafriks flexbox it isn't optional in bootstrap 4 (was in alpha (because of some issues with decimals and miscalculation in browsers - was changed/fixed), d-* selectors for changing the display value - your link was to 4.0 uptodate is 4.3) and bootstrap is lighter in my eyes and tested like nothing else.
Example:
https://getbootstrap.com/docs/4.3/layout/grid/
Only grid example is in repo of bootstrap (light weight):
https://github.com/twbs/bootstrap/blob/master/scss/bootstrap-grid.scss
I personally would never use the jquery tab stuff, but vanilla js is planed (i think v5) and a separate project does it already. Most times i use grid, reboot, images, utils (multiple like respnsive embed, text), nav, pagination, forms and thats nearly the complete list. No popover, no progress, no carousel...
You only include needed components and you can set your own variables or for example to avoid the button overhead. Include the mixin and call the mixin with wanted colors. 10% darker and other stuff are calculated by mixin.
@silverwind commented on GitHub (May 15, 2019):
I see. Well it certainly is an option. We will have to add quite a bit of custom CSS to whatever framework we choose. If Bootstrap allows to import single components, that'd probably be a great start to gradually move over. Would start by converting LESS to SCSS first and take it from there.
@xf- commented on GitHub (May 15, 2019):
Converter exists, but scss has more functions and i think shouldn't be used. Easier to generate a old css include it as well and delete part by part. set a good linter in place like and replace the lines. A lot of stuff can be done with cards/ menus provided and some adjusted variables.
This would allow for multiple merges and less problems while switching/replacing and other commits touching templates and classes.
Options like bold, uppercase should be set via class. Custom CSS should be reduced and maybe different kind of mobile menu
@xf- commented on GitHub (May 18, 2019):
About the size

Bootstrap master min (complete) - last commit "v5 dist"
https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.min.css
v4.3.1 release

Bulma (min - complete)

(Depending on content gzip/brotli have so different size)
@lafriks commented on GitHub (May 21, 2019):
About lighter I meant resulting layout html
@lunny commented on GitHub (Jan 28, 2020):
Since we have used roboto font, I think we could close this one.