You are not logged in.

#1 2025-08-28 08:34:18

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 523

[SOLVED] GTK: disable characters autoreplacement in input widgets

Some character sequences in firefox address bar are automatically replaced by other glyphs. For example, when I type "->", it is replaced with
KoD2.png
When I type "<=>", it is replaced with
KoD_.png
Firefox 142.0.1.

This is very annoying. Is this quirk of firefox or something else system-wide? Does anyone know how to disable this "feature"?
Some time ago I faced with similar behavior in vscodium and found how to disable it in vscodium options. For firefox I found nothing yet.
Thank you in advance.

Last edited by dimich (2025-08-29 06:54:49)

Online

#2 2025-08-28 09:59:37

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,837

Re: [SOLVED] GTK: disable characters autoreplacement in input widgets

It appears to be a visual change only.

c/p to a text editor shows the original characters , deleting the last char shows the others still being there.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2025-08-28 10:12:24

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 523

Re: [SOLVED] GTK: disable characters autoreplacement in input widgets

Lone_Wolf wrote:

It appears to be a visual change only.

I understand. It is even possible to move caret in the middle of that composed "character".
But I want to disable this replacement, so looking for starting point: whether it performed by firefox itself or something else, e.g. fontconfig.

Online

#4 2025-08-28 15:16:41

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,695

Re: [SOLVED] GTK: disable characters autoreplacement in input widgets

https://wiki.archlinux.org/title/Font_c … aced_fonts
But idk whether FF respects FC settings here enough hmm
(I get the same behavior, though, so in theory I could experiment w/ this but rn I need the browser running wink)

Edit: doesn't look like sad
Gemini sugested

    #urlbar {
      -moz-font-feature-settings: "liga=0";
    }

in your userChrome.css, but doesntwork™ - stupid AI (was couched as unofficial and pot. subject to change, though)

Last edited by seth (2025-08-28 15:40:07)

Offline

#5 2025-08-29 04:47:27

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 523

Re: [SOLVED] GTK: disable characters autoreplacement in input widgets

seth wrote:
    #urlbar {
      -moz-font-feature-settings: "liga=0";
    }

in your userChrome.css, but doesntwork™ - stupid AI (was couched as unofficial and pot. subject to change, though)

Modern firefox requires "toolkit.legacyUserProfileCustomizations.stylesheets = true" for userChrome.css to have effect. However, neither -moz-font-feature-settings: "liga=0"; nor font-feature-settings: "liga=0"; changes anything. Probably it should be some other feature name rather than "liga".

Just for test I changed userChrome.ccs to

#urlbar {
    font-family: "Courier New";
}

and it makes effect. Moreover, glyphs are NOT replaced in this case. It seems like this replacement is a feature set for font used by firefox in address bar (and "Find in page" bar as well). It would be helpful first to find out what this font is.

Online

#6 2025-08-29 05:29:30

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 523

Re: [SOLVED] GTK: disable characters autoreplacement in input widgets

Oh gosh, this is not only in firefox but in many gtk3 and gtk4 applications. For example, in any Edit widget of gtk3-demo and gtk4-demo.
Edit: updated subject.

Online

#7 2025-08-29 06:50:55

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,695

Re: [SOLVED] GTK: disable characters autoreplacement in input widgets

~/.config/fontconfig/conf.d/99-no-ligatures.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
  <description>Disable ligatures for monospaced fonts to avoid ff, fi, ffi, etc. becoming only one character wide</description>
  <match target="font">
    <edit name="fontfeatures" mode="append">
      <string>liga off</string>
      <string>dlig off</string>
      <string>calt off</string>
      <string>clig off</string>
    </edit>
  </match>
</fontconfig>

it's calt/clig (for me) - still not tested FF

Offline

#8 2025-08-29 06:52:40

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 523

Re: [SOLVED] GTK: disable characters autoreplacement in input widgets

Found that this feature is called "Contextual Alternative". Now I'm looking how to disable it globally and permanently.

Online

#9 2025-08-29 06:54:34

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 523

Re: [SOLVED] GTK: disable characters autoreplacement in input widgets

seth wrote:

~/.config/fontconfig/conf.d/99-no-ligatures.conf

Yep, this works. Thank you!

Online

Board footer

Powered by FluxBB