If you look closely, Kana appears a little thicker than Kanji and Latin characters. Hangeul also appears thicker just like the Kana.

It seems to affect Dolphin and Strawberry. But I noticed that the Firefox file picker is fine:

Actually, Firefox itself is completely fine and I’m pretty sure it just uses Noto fonts as well. Fonts on Discord are also okay.

One thing I did notice is that “Noto Sans CJK” (JP/KR/SC/TC/etc) DOES appear thicker in the Font System Settings of KDE. This is what “Noto Sans Regular” looks like:

And this is what “Noto Sans CJK” looks like:

Notice that both “Regular” text do not appear to be the same. The CJK one is thicker.

Right now, a work-around is to set my main font as “Noto Sans CJK” but set it to “Light” instead of “Regular” and it looks pretty good:

But the Monospace Noto Sans CJK is thick as well with no option to make it lighter. Not as much of an issue as the graphical apps though:

This is a fresh install of Fedora 43 KDE btw. Hope someone can help me out here before I nuke this install for Bazzite, CachyOS, or something else lol

  • coherent_domain@infosec.pub
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    3 days ago

    I recall very long time ago, I used to have improperly rendered CJK because of language setting.

    Apparently, some character can be renderer differently in Kanji and Chinese, which causes size/type face inconsistency. Can you add Japanese as the secondary (or primary) language in your machine, restart and see if it fixes anything?

    • hitagi@ani.socialOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      I put it up like this (including just keeping 日本語) and the fonts are still thick :(

  • A_norny_mousse@feddit.org
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    3 days ago

    My guess is this has nothing to do with KDE and is a font and/or fontconfig issue. Figure out which default fonts your apps use, then see what they get substituted for for different character sets. I have never done the latter, but I know it’s possible. The former is

    fc-match "default font"

    man fc-match and web searches will help.

    There’s a lot fontconfig can do to influence what actual fonts apps end up choosing. Here’s a primer.

    • hitagi@ani.socialOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago
      $ fc-match "default font"
      NotoSans-Regular.ttf: "Noto Sans" "Regular"
      

      This seems to be correct.

      $ fc-match :lang=ja
      NotoSansCJK-Regular.ttc: "Noto Sans CJK JP" "Regular"
      

      Also seems to be correct.

      I skimmed through the primer and checked whats on the default fontconfig config:

      $ cat ~/.config/fontconfig/fonts.conf 
      <?xml version='1.0'?>
      <!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
      <fontconfig>
       <!-- 
       Artificial oblique for fonts without an italic or oblique version
       -->
       <match target="font">
        <!-- check to see if the font is roman -->
        <test name="slant">
         <const>roman</const>
        </test>
        <!-- check to see if the pattern requested non-roman -->
        <test compare="not_eq" name="slant" target="pattern">
         <const>roman</const>
        </test>
        <!-- multiply the matrix to slant the font -->
        <edit mode="assign" name="matrix">
         <times>
          <name>matrix</name>
          <matrix>
           <double>1</double>
           <double>0.2</double>
           <double>0</double>
           <double>1</double>
          </matrix>
         </times>
        </edit>
        <!-- pretend the font is oblique now -->
        <edit mode="assign" name="slant">
         <const>oblique</const>
        </edit>
        <!-- and disable embedded bitmaps for artificial oblique -->
        <edit mode="assign" name="embeddedbitmap">
         <bool>false</bool>
        </edit>
       </match>
       <!--
       Synthetic emboldening for fonts that do not have bold face available
       -->
       <match target="font">
        <!-- check to see if the weight in the font is less than medium which possibly need emboldening -->
        <test compare="less_eq" name="weight">
         <const>medium</const>
        </test>
        <!-- check to see if the pattern requests bold -->
        <test compare="more_eq" name="weight" target="pattern">
         <const>bold</const>
        </test>
        <!--
                        set the embolden flag
                        needed for applications using cairo, e.g. gucharmap, gedit, ...
                      -->
        <edit mode="assign" name="embolden">
         <bool>true</bool>
        </edit>
        <!--
                       set weight to bold
                       needed for applications using Xft directly, e.g. Firefox, ...
                      -->
        <edit mode="assign" name="weight">
         <const>bold</const>
        </edit>
       </match>
       <match target="font">
        <edit mode="assign" name="hinting">
         <bool>true</bool>
        </edit>
       </match>
       <match target="font">
        <edit mode="assign" name="hintstyle">
         <const>hintslight</const>
        </edit>
       </match>
       <match target="font">
        <edit mode="assign" name="rgba">
         <const>rgb</const>
        </edit>
       </match>
       <dir>~/.local/share/fonts</dir>
       <match target="font">
        <edit mode="assign" name="antialias">
         <bool>true</bool>
        </edit>
       </match>
      </fontconfig>
      

      I tried removing “Synthetic emboldening” here but it doesn’t seem to change anything so I put it back. I also tried removing fonts.conf but it still doesn’t change anything. My gut feeling is that there is a fontconfig config somewhere changing the way Noto Sans CJK is being rendered in KDE/QT. I just couldn’t figure out where or what. The fonts themselves are fine in LibreOffice so I don’t think there’s any issue with the package.

      Now reading through the primer again, I checked the configs in /etc/fonts/conf.d and found all the configs there. There’s a lot so I’ll look through it and see which one might be changing the way CJK is rendered.

      • A_norny_mousse@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        $ fc-match “default font” NotoSans-Regular.ttf: “Noto Sans” “Regular”

        That’s not what I meant. You mention differences between dolphin (not ok) and Firefox (ok). So you need to check what they use as default fonts respectively. If there are differences you know what to do.

        • hitagi@ani.socialOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 days ago

          They’re both already using Noto Sans. IIRC Firefox has its own way of rendering fonts so it’s likely a KDE/Qt font rendering issue.

          • A_norny_mousse@feddit.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            2 days ago

            They’re both already using Noto Sans

            For all/relevant encodings?

            Have you considered that maybe Noto developers made a choice there, to render Kanjoi thicker than Chinese characters? I know, that doesn’t explain why Dolphin would render them in a way that is more pleasing to you. Have you tried using other fonts altogether?

            • hitagi@ani.socialOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 days ago

              For all/relevant encodings?

              As far as I understand (Firefox Font settings, using fc-match, fontconfig, etc), it’s properly configured.

              Have you considered that maybe Noto developers made a choice there, to render Kanjoi thicker than Chinese characters?

              Assuming you meant Kana (and Hangeul as well), I’m not sure why they would do that because it makes it appear so inconsistent.

              I know, that doesn’t explain why Dolphin would render them in a way that is more pleasing to you. Have you tried using other fonts altogether?

              You mean Firefox (and the Firefox file picker) because Dolphin doesn’t render it well at all. I actually tested a few things. I uninstalled the Noto Sans CJK package to see what other fonts it would fall back to. It falls back to Droid Sans and it looks pretty good in my opinion. It doesn’t become thick like Noto Sans CJK. So maybe it’s really something intentionally done by the Noto developers.

              BUT Noto Sans CJK looks fine in Firefox, LibreOffice, and GIMP.

              A few more things I tested:

              1. Bazzite live ISO on a virtual machine also has thick Kana and Hangeul (problem isn’t limited to Fedora KDE?)
              2. Flatpak Strawberry and Dolphin results in Chinese/Kanji becoming thick (???)
              3. Fedora GNOME renders CJK fine (KDE issue?)
              4. Nautilus on Fedora KDE renders CJK fine (Qt issue?)
              5. Changed the fallback font for ja and ko via ~/.config/fontconfig/fonts.conf to Droid Sans Fallback (I also tried setting it to Noto Sans CJK Light), then confirming changes using fc-match. Restarted and cleared fc-cache. Dolphin and Strawberry did not respect my changes. Nautilus does though. (Qt issue?)
              6. Replaced CJK VF fonts with non-VF fonts. No difference.

              Something tells me it’s a KDE or Qt thing, or maybe it’s a Fedora thing? It works fine with GNOME and GTK apps like Nautilus. This is beyond what I know at this point so I’ll just post this over to the Fedora forums.

    • hitagi@ani.socialOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      3 days ago

      That screenshot was just an example but regardless of whether I set my main font as JP/KR/HK/SC/TC etc, the font appears thicker in its “Regular” style unlike non-CJK Noto Sans.

      Still haven’t found a way to fix it but setting Noto Sans CJK Light as my main font is good enough (see the last picture of my post).

      edit: what my config looks like right now:

      Kana and Hangeul look okay with this.