Briefly mentioned in #444, numbers fail to render on some browsers because of emoji fonts. (削除) Tested on Tor Browser 10.0.16 (based on Mozilla Firefox 78.10.0esr)Segoe UI Emoji seems to be to blame. (削除ここまで)
Numbers don't render on some browsers #445
Can reproduce with Tor 10.0.15 and 1.0.16, too.
Please see https://tor.stackexchange.com/questions/16051/why-tor-browser-doesnt-recognize-many-emojis
The second problem Tor Browser faces, more or less uniquely, is that it is trying to block fingerprinting attacks. Websites can determine available fonts on a system, if they are able to do this then they can use the set of installed fonts as a fingerprint. Available fonts split anonymity sets, since Windows users, OSX users and Linux users will all have different fonts available and any user who has added custom fonts will be even more unqiue and trackable. To solve this problem, Tor Browser ships a limited set of fonts with it and tries to restrict it to only use those fonts, so that users have a consistent set of available fonts across platforms making them harder to track and tell apart.
I think this might be the related (the fact that Tor does not rely on the system fonts). I guess there is no option to only ship webfonts if there is no other font available? Because missing numbers are an issue.
I'm not able to reproduce this on any other website, even those who don't ship webfonts. Maybe there is really one font in the list that causes the issue?
This just doesn't make any sense - why would non emoji numbers be affected?
I think we need to see a screenshot of an actual issue that is occuring.
If it's just the font rendering issue because the emoji font isn't being provided, well one option for codeberg is to just edit the custom/header.tmpl to include a <style> that adds (I think this is correct - adjust as necessary): (for 1.14.x)
<style>
@font-face {
font-family: 'Noto Color Emoji';
src: url('/NotoColorEmoji.eot'); /* IE9 Compat Modes */
src: url('/NotoColorEmoji.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('/NotoColorEmoji.woff2') format('woff2'), /* Super Modern Browsers */
url('/NotoColorEmoji.woff') format('woff'), /* Pretty Modern Browsers */
url('/NotoColorEmoji.ttf') format('truetype'), /* Chrome, Safari, Android, iOS */
url('/NotoColorEmoji.svg#svgFontName') format('svg'); /* Legacy iOS */
}
</style>
and then add the font files to the public/ directory. (for 1.15.x the urls should be /assets/NotoColorEmoji.* - again I think this is correct.)
I think we need to see a screenshot of an actual issue that is occuring.
From #444:
Removing Segoe UI Emoji from the --fonts-emoji seems to fix it. I'm not sure why it affects numbers.
Reproducing with Tor 10.0.16, it's not enough to remove Segoe UI Emoji from the --fonts-emoji to get rid of the issue, I have to either completely disable (or empty) the property or remove ,"Twemoji Mozilla" from the end of the property.
so on chrome it's possible to check what font is providing glyphs in the inspector.
Is it possible to do this on Tor's browser?
for simplicity it might be best to just have the number in a single paragraph by itself.
I suspect Tor's browser has emoji fonts that have the number glyphs in them to prevent number fallbacks being used to identify the browser but... the emoji fonts are lower in priority than the system-ui font - so are we actually looking at the wrong problem? Is it possible that Tor is not liking the system-ui metafont?
Instead of deleting fonts you could try adding a font instead - add whatever is the default font for the Tor browser to the end of --fonts-proportional instead?
The computed font-family property of the missing issue count in the upper tab is:
-apple-system, "Segoe UI", system-ui, "Roboto", "Helvetica Neue", "Arial", "Noto Sans", "Liberation Sans", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif
I added "Arimo" to the --fonts-proportional (which is the default font in Tor Browser) and numbers are visible again.
Oh, I thought Firefox would not expose the rendered font, but it's in an extra "Fonts" tab.
Twemoji Mozilla is the used font to render the numbers.
image
OK - so we have a winner. It's not the fault of the emoji - but rather the fallback process. Nothing has matched before the emoji font matches.
Would it be possible to check if you add sans-serif to end of the --fonts-proportional if that fixes it too?
it would also be useful to ensure that sans-serif doesn't kill the emoji too.
Yes, that works here, too.
it would also be useful to ensure that sans-serif doesn't kill the emoji too.
If I do the change in issue #444, numbers appear and the emojis don't disappear. At least on my system with this browser 😂
I think that this implies that --fonts-regular should be:
--fonts-regular: var(--fonts-override, var(--fonts-proportional)), "Noto Sans", "Liberation Sans", sans-serif, var(--fonts-emoji);
not:
--fonts-regular: var(--fonts-override, var(--fonts-proportional)), "Noto Sans", "Liberation Sans", var(--fonts-emoji), sans-serif;
as it currently is.
(btw I've literally only just realised quite how annoying the emoji selector thing is when you press ':'. I suspect that there should be a delay of 50ms before displaying that thing. I guess this is what happens when you're not dogfooding enough.)
I've put up a PR on GH for this: https://github.com/go-gitea/gitea/pull/15855
Yes, your proposal works here.
Offtopic / to the emoji picker: I'd kinda say it's completely broken or at least really buggy. Try typing and removing a letter from the search - it just sticks on the screen, even if you remove the :. And sometimes it doesn't appear, sometimes it appears out of the window, try typing
: : : : : : : : : : : : : : : : : : : : : : : : : : : : :
for example and watch how the position jumps up and down if you're fast enough. It's possible to bring it out of screen this way 😂 ← here it didn't appear after typing :joy, had to remvoe and try again ...
I hoped this might change with the switch to plain textarea?
OK a workaround would be to add "Noto Sans" to that style mentioned in #445 (comment)
Regarding the emoji picker - I think it definitely needs looking at - the question is where is my time best spent. E.g. I need to write a commit-graph reader that's a bit more frugal with memory in order to speed up the native git backend. (I've got a fix into go-git that will mean that at least it won't read 100Mb files into memory and store them in a cache anymore but I think we still need the native git backend.)
I think moving up the default sans-serif font is a much more elegant solution. I think we'll look into cherry-picking or so ... but we'll see.
I wouldn't want to waste my time on that tbh, too.
By the way, what's the reason for all the effort with go-git? I don't really see the point in writing a new git backend, sounds just like a lot of effort and currently results in code duplication because some functions are copied in gogit and nogogit files ... but I'm not that deep in Gitea's development, I was just wondering ...
(I read recent issues like 15707 etc, but I still don't get the general picture of how everything works ... don't bother with an answer if you don't want to take the time now, I'll find out someday hehe)
By the way, what's the reason for all the effort with go-git? I don't really see the point in writing a new git backend, sounds just like a lot of effort and currently results in code duplication because some functions are copied in gogit and nogogit files ... but I'm not that deep in Gitea's development, I was just wondering ...
You may have noticed that codebergs memory requirements have dropped about 2/3 since the upgrade to 1.14 - that is primarily because of the work I did in writing/restoring the native git backend.
Go-git is simply not frugal with memory at all - and prior to https://github.com/go-git/go-git/pull/303 as I said above it would happily read in a 100Mb file sticking it in a cache to hang around even when you then don't render it because you read the header and find it is 100Mb. This was a serious enough issue that we felt we had to fix it - as otherwise you could just about kill any Gitea server by strategically naming a large file README.md.
Now, why do we need to keep the go-git backend around: Windows. It turns out that Windows has a severe problem with opening git processes so whilst I've worked hard on a reducing the repeated openings I think they're gonna need go-git for a while.
Why do I need to write a commit-graph reader? Well the algorithm implemented for native git backend for commit-info - the thing that says what commit last touched a file - is rather dumb. I used the dumb algorithm because it appeared fast enough locally but it seems that at least for some repository style it is pathologically bad. That means we need to improve the situation.
So now that we have 303 in go-git should we just move back to go-git? Well... I dunno. I still have worries about its memory use and caching. Another worry I have is how we migrate to SHA256.
Hence why I think we're stuck with two backends at least until one shows its definitely better than the other.
do we have an upstream issue for this already?
@fnetX you added the upstream lable ...
We have a PR #445 (comment) (you even reviewed 😛)
But the reasonf or the label was that I fired the combined report for the two font issues and someone came in :')
Bug bug bug: 😂
We have a PR https://codeberg.org/Codeberg/Community/issues/445#issuecomment-198194 (you even reviewed 😛)
renders as
We have a PR #445 (comment) (you even reviewed 😛)
Ah it's #212 again ...
ah ok didnt notice: "numbers not working" == "browser use emoji font to try to display numbers"
PS: updated this issue desc.
Yeah sorry for the confusion, I thought those two issues would be related at first.
And sorry for the spam here, I was a bit clumsy with my PC 🙈
ashimokawa deployed the patch. Confirmed working in Tor 10.0.16
Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
Something is not working the way it should. Does not concern outages.
Errors evidently caused by infrastructure malfunctions or outages
This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
Please join the discussion and consider contributing a PR!
No bug, but an improvement to the docs or UI description will help
This issue or pull request already exists
New feature
Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
An issue directly involving legal compliance
involving questions about the ToS, especially licencing compliance
Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
Things related to Codeberg's external communication
More information is needed
This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
Related to Forgejo. Please also check Forgejo's issue tracker.
Migration related issues in Forgejo
Issues related to the Codeberg Pages feature
Issue is related to the Weblate instance at https://translate.codeberg.org
Woodpecker CI related issue
involves improvements to the sites security
Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
Codeberg's current set of contributors are not planning to spend time on delegating this issue.
No due date set.
No dependencies set.
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?