enchanted-sword / ch-utils

Utilities for cohost
https://cohost.org/chutils
GNU General Public License v3.0
17 stars 4 forks source link

Non-bold text does not render in extension menu #1

Closed irasponsible closed 2 months ago

irasponsible commented 3 months ago

Describe the bug In the extension's menu, only bold text and the monospaced config export text renders.

imageimage imageimage

Device information:

Additional context

enchanted-sword commented 3 months ago

Very strange.... The only thing I can think of to try to fix it from chutils' end is to switch to woff and see if that makes any difference.

irasponsible commented 3 months ago

I saw you switched to .WOFF, so I built from source to see if that worked, and now I get a different issue! Willing to admit I may have messed up something npm-related though, I've not used it before. I now can't click on any other tabs, and still text issues!

This is with Atkinson Hyperlegible installed on my system as a .TTF. And without Atkinston Hyperlegible installed on my system, the same, but with no text at all! image

Back to using the pre-built version from Mozilla Addons again; Completely removing Atkinson Hyperlegible from my system (+ re-setting font cache + restarting) meant I got no text at all (except the Courier New in the config export which I have installed anyway). I found a version of Atkinson Hyperlegible as an OTF; installing that also meant I get no text. Installing Atkinson Hyperlegible as TTF goes back to what I had at the start.

I think the issue is probably something on my end, or Linux, Firefox, and TTF fonts? (I can find some people with similar issues, but not the same). It just seems bonkers to me that Bold text works as intended, but not Regular text!

I guess file this as a known issue and leave it? I worked out what the options all do by poking around the source, so it's not a showstopper.

enchanted-sword commented 3 months ago

It looks like you had some sort of error during the process of populating the features, but at the very least the non-bolded tab text would show up if the font was working correctly, since it's part of the HTML. It's weird too because there are fallback fonts listed, so it seems like the browser recognizes the font, but has some issue with displaying the actual glyphs.

IainPassa commented 2 months ago

I'm getting no text either on my Arch Linux system, and I've also had the problem before when a friend of mine tried to embed Atkinson Hyperlegible in a webpage. Testing the local fonts on my own machine, I found that only the OTF version worked with anything, and that the TTF and WOFF versions would consistently fail to render any text and fail to fallback to other fonts when inside web browsers (they wouldn't even render any letters in the FreeType font viewer). Unfortunately, having the OTF installed locally didn't fix webpages embedding the TTF or WOFF, so I had to get them to embed the OTF file in their CSS before the TTF or WOFF to get my browser to render any text without changing the CSS with inspect element every time.

enchanted-sword commented 2 months ago

In that case, I can try using the OTF version of the font instead

IainPassa commented 2 months ago

I will let you know if doing that fixes it for me

IainPassa commented 2 months ago

Having built the addon with the commit that changes the font format and tested it with Firefox Developer Edition, I can confirm the change makes text render correctly on my machine where it didn't before