Closed Bug 1706943 Opened 5 years ago Closed 5 years ago

Having "Terminus" set as monospace font, it gets waaay oversized

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 89
defect

Tracking

()

RESOLVED DUPLICATE of bug 1704466

People

(Reporter: hekurangashi, Unassigned)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

Just updated to the latest version of firefox-developer-edition.
I'm using ArchLinux, so i get the latest version relatively fast.

Actual results:

On any site, when they have code blocks, or monospace font, and your monospace font is set to "Terminus", the monospace font is oversized very much.
Example page: https://wiki.archlinux.org/index.php/Installation_guide

Expected results:

Nothing. Display as normal.

The last "Terminus" font update is on march, so i suppose it was not the fault of the terminus font package i have installed.
I have the default terminus-font package installed, from the official ArchLinux repo.
They are not ttf/otf. The package contains ".otb" bitmap font (and .pcf.gz for console, which is irellevant for this report)

NOTE: The issue of the "Terminus" font not resizing still exist. Meaning: while other fonts resize as they should, this font stays as it is.
(in tty or terminals, Terminus has fixed specific sizes, so: while other TTF/OTF font resizes every time you incite resizing, terminus only resizes when you have reached the size in which Terminus is available in, which are:"12, 14, 16, 18, 20, 22, 24, 28, 32" )

Trying "Terminus Nerd Font" aka: "Terminess", which is a TTF font, it works just as it should, which then leads me to believe that firefox has an issue wit Bitmap fonts in general and not just this Terminus font. Though i have not tried any other bitmap font, cause i have been using Terminus for years, and cannot just switch the font.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core

I get the opposite behavior (terminus gets undersized), but I'm on a HiDPI display so that might be why.

At least the undersizing seems to happen for a while (I tried 82 at random and it shows the same behavior):

mozregression --launch 82 --pref font.name.monospace.x-western:Terminus -a https://wiki.archlinux.org/index.php/Installation_guide

Is there any chance you could pip install --user mozregression and see what broke this for you? (assuming it worked before?)

(first time here reporting bugs)
I ran your magic command and firefox with a new profile opened. Yes it worked! Behavior was just like in previous versions. Terminus, again, had only one size like always (to me).
(i had to install pip just for this 😅 thankfully they explain venv early on in the pip documentation, so i can easily debloat my system afterwards.)

In 240% zoom. Every font enlarges, but not Terminus.
The same (but opposite) happens when i go in minus. (looks kinda my first uploaded screenshot 😊)

Right, so... Can you run mozregression --good 82, and write good when the page looks as you expect, and bad when the page looks differently, and post the results here? That'd let us know when did we change behavior here.

Flags: needinfo?(hekurangashi)

Well the full command should be:

mozregression --good 82 --pref font.name.monospace.x-western:Terminus -a https://wiki.archlinux.org/index.php/Installation_guide

Of course

(tutorial_env) [tuser ~D]
$ mozregression --good 82 --pref font.name.monospace.x-western:Terminus -a https://wiki.archlinux.org/index.php/Installation_guide
**********
You should use a config file. Please use the --write-config command line flag to help you create one.
**********

 0:00.28 INFO: No 'bad' option specified, using 2021-04-22
 0:01.46 INFO: Using date 2020-09-21 for release 82
 0:02.41 INFO: Testing good and bad builds to ensure that they are really good and bad...
 0:02.41 INFO: Downloading build from: https://archive.mozilla.org/pub/firefox/nightly/2020/09/2020-09-21-21-36-12-mozilla-central/firefox-83.0a1.en-US.linux-x86_64.tar.bz2
===== Downloaded 100% =====
 0:24.45 INFO: Running mozilla-central build for 2020-09-21
 0:39.04 INFO: Launching /tmp/tmpoh_soj9h/firefox/firefox
 0:39.05 INFO: Application command: /tmp/tmpoh_soj9h/firefox/firefox https://wiki.archlinux.org/index.php/Installation_guide -profile /tmp/tmppjocppnq.mozrunner
 0:39.06 INFO: application_buildid: 20200921213612
 0:39.06 INFO: application_changeset: a5cdfde00f159276453541049a8cbb5f7043ae2a
 0:39.06 INFO: application_name: Firefox
 0:39.06 INFO: application_repository: https://hg.mozilla.org/mozilla-central
 0:39.06 INFO: application_version: 83.0a1
Was this nightly build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry' or 'exit' and press Enter): good
 0:56.54 INFO: Using local file: /tmp/tmpbltweeoo/2021-04-22--mozilla-central--firefox-90.0a1.en-US.linux-x86_64.tar.bz2 (downloaded in background)
 0:56.54 INFO: Running mozilla-central build for 2021-04-22
 1:13.70 INFO: Launching /tmp/tmpc9tjtb91/firefox/firefox
 1:13.70 INFO: Application command: /tmp/tmpc9tjtb91/firefox/firefox https://wiki.archlinux.org/index.php/Installation_guide -profile /tmp/tmpu544e7fu.mozrunner
 1:13.72 INFO: application_buildid: 20210422093115
 1:13.72 INFO: application_changeset: c00239b6c35155149b2e2d8caa02c1c96d21e546
 1:13.72 INFO: application_name: Firefox
 1:13.72 INFO: application_repository: https://hg.mozilla.org/mozilla-central
 1:13.72 INFO: application_version: 90.0a1
Was this nightly build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry' or 'exit' and press Enter): good
 1:35.96 ERROR: Build was expected to be bad! The initial good/bad range seems incorrect.

(as im understanding, this is trying out verions. i have mentioned that it was working with firefox-developer-edition 88.0b9

Flags: needinfo?(hekurangashi)

@emilio I just installed firefox-nightly 90.0a1 20210422-1 and the problem appears to be fixed. So the problem only exist in firefox-developer-edition 89.0b2.
I hope the problem in does not go downstream to main ff branch (88.0), otherwise a lot of people will have that problem.
I use the dev edition cause thats the latest in the official repo, i will be using nightly (which is in the unofficial aur) untill dev is repaired.

Additional info

forgot to mention my ff profiles: https://github.com/narukeh/dotfiles/tree/master/.config/.mozilla/firefox

(In reply to Hekuran from comment #7)

(as im understanding, this is trying out verions. i have mentioned that it was working with firefox-developer-edition 88.0b9

Yeah, so this is bisecting, which will find the change that caused this. The error above means indeed that it's fixed on Nightly, so we need to find a Nightly that is broken (probably 89) and then find the fix. So something like mozregression --bad 89 --find-fix ... hopefully does it, otherwise we need to find a specific date that should the issue.

I'll give a shot at that but since this depends on system fonts etc it might not fully repro on my system.

Flags: needinfo?(emilio)
Attached image font fonfig

Well if its fix in nighlty, the fix will come to dev, right?

I think you just might reproduce, download these arch pkgs:
https://archive.archlinux.org/packages/f/firefox-developer-edition/firefox-developer-edition-89.0b2-1-x86_64.pkg.tar.zst
https://archive.archlinux.org/packages/t/terminus-font/terminus-font-4.49.1-2-any.pkg.tar.zst
Arch pkgs are just tar archives, (that have inside them some .files that informs the package manager, irrelevant for us now).
This is what i did to be able to reproduce:
I uninstalled all firefox packages, and then installed the firefox run dependencies. Removed cache rm -rf ~/.cache/* /tmp/* . Even removed rm -rf ~/.mozilla/, just to tell that i have no issuing config done.Then:

cd your_dl_dir
mkdir -p delete_later/terminus delete_later/ffdev
cd delete_later/terminus
tar -xvf ../../terminus-font-4.49.1-2-any.pkg.tar.zst
mkdir ~/.local/share/fonts/terminus_manually
cp -rf ./usr/share/fonts/misc/ter-* ~/.local/share/fonts/terminus_manually
fc-cache -r

with that you should have the fonts installed, now do the same for firefox:

cd your_dl_dir/delete_later/ffdev
tar -xvf ../../firefox-developer-edition-88.0b9-1-x86_64.pkg.tar.zst
cd ./usr/lib/firefox-developer-edition/
./firefox

first time it did not work but when i deleted rm -rf ~/.cache/* /tmp/* ~/.mozilla , it worked just fine. Again, have ff run dependecys installed.
Font config:
pic-selected-210423-1348-56.png

Ah, thanks for finding it! It's a bit surprising that that changed behavior in that case but I guess not totally crazy. I'll either get that uplifted to 89 or revert the patch that regressed it.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(emilio)
Resolution: --- → DUPLICATE

Oh, interesting! I guess there are a collection of individual bitmap sizes of the font, all equally good matches to the other style properties; we depend on fontconfig to give us the best size match at the front of the list, but by reversing them we sabotaged that. Glad you were able to figure out where this arose.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: