antialiasing/font: Appimage programme does not follow the xfce setting

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

antialiasing/font: Appimage programme does not follow the xfce setting

#1 Post by Duliwi »

Hello

My system is Antialiasing free.

This works great, but now I have a single appimage programme, that has a font, that is not compatible for my antialiasing free system. The font is ugly. Of course in Xfce settings I have chosen Arial as font for my hole system. But this appimage programme (FreeTube) does not follow this setting.

Is there a possibility to activate Antialiasing only for a particular appimage programme?

Or if the upper is not possible:
Is it possible to change the font of a particular appimage programme only? So that the system replaces the font in appimage before it shows the font in the Gui?

Any idea?


Edit:
How it looks like:
fontFreeTube.png
You do not have the required permissions to view the files attached to this post.

User avatar
thomasl
Posts: 485
Joined: Sun Feb 04, 2018 9:26 am

Re: antialiasing/font: Appimage programme does not follow the xfce setting

#2 Post by thomasl »

Duliwi wrote: Mon Feb 24, 2025 4:28 amIs there a possibility to activate Antialiasing only for a particular appimage programme?

Or if the upper is not possible:
Is it possible to change the font of a particular appimage programme only? So that the system replaces the font in appimage before it shows the font in the Gui?
I don't know the answer for Q 1 (though I suspect it's No). But of course if the app has a font selection box you could just try to select another font. I also don't think the system will replace fonts for or in an AppImage on the fly.
Having said that, if the system doesn't do that, perhaps you could (this is somewhat hackish but perhaps it'll offer a way forward). A rough outline would look like that:
1. unpack the AppImage into an empty directory (recent versions of 7-Zip can do that).
2. search the unpacked directory tree for the font file that's used to display text.
3a. check whether the actual font filename is specified the app's config files and if so, change that to another font
3b. or delete the font file (probably too brutal :rolleyes: )
3c. or copy a better suited but similar font file but keep the name the same
4. pack the modified directory tree into a new AppImage and check it out (you'll need appimagetool for that)

I've "patched" a few AppImages in this way (though never changed fonts) and sometimes this works, sometimes it doesn't.
Frugal installs on Lenovo ThinkPad L14 Ryzen 5 4650U/24GB * HP Pavilion Ryzen 3 3300U/16GB * Toshiba R950 i5-3340M/12GB
I have a reservation... What do you mean it's not in the COMPUTER!

User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Re: antialiasing/font: Appimage programme does not follow the xfce setting

#3 Post by Duliwi »

Thank you very much.

I have unpacked my appimage with the command ...

Code: Select all

./freetube-0.23.2-amd64.AppImage --appimage-extract
It is unpacked into the folder /squashfs-root/ ...

Code: Select all

/squashfs-root/locales/am.pak
/squashfs-root/locales/zh-CN.pak
/squashfs-root/locales/lv.pak
/squashfs-root/libffmpeg.so
/squashfs-root/resources/app-update.yml
/squashfs-root/locales/sv.pak
/squashfs-root/locales/nb.pak
/squashfs-root/locales/tr.pak
/squashfs-root/locales/ko.pak
/squashfs-root/usr/lib/libnotify.so.4
/squashfs-root/chrome_crashpad_handler
/squashfs-root/locales/da.pak
/squashfs-root/locales/en-US.pak
/squashfs-root/locales/ar.pak
/squashfs-root/locales/fil.pak
/squashfs-root/usr/lib/libXtst.so.6
/squashfs-root/chrome_100_percent.pak
/squashfs-root/locales/cs.pak
/squashfs-root/locales/ta.pak
/squashfs-root/locales/fa.pak
/squashfs-root/locales/mr.pak
/squashfs-root/usr/lib/libgconf-2.so.4
/squashfs-root/libEGL.so
/squashfs-root/locales/gu.pak
/squashfs-root/locales/ja.pak
/squashfs-root/libvulkan.so.1
/squashfs-root/locales/th.pak
/squashfs-root/locales/bn.pak
/squashfs-root/.DirIcon
/squashfs-root/locales/hu.pak
/squashfs-root/locales/vi.pak
/squashfs-root/snapshot_blob.bin
/squashfs-root/locales/ro.pak
/squashfs-root/locales/sl.pak
/squashfs-root/libGLESv2.so
/squashfs-root/locales/zh-TW.pak
/squashfs-root/locales/ur.pak
/squashfs-root/AppRun
/squashfs-root/libvk_swiftshader.so
/squashfs-root/locales/hr.pak
/squashfs-root/locales/es.pak
/squashfs-root/locales/fr.pak
/squashfs-root/locales/pl.pak
/squashfs-root/LICENSES.chromium.html
/squashfs-root/resources/app.asar
/squashfs-root/locales/uk.pak
/squashfs-root/locales/nl.pak
/squashfs-root/locales/sw.pak
/squashfs-root/locales/bg.pak
/squashfs-root/usr/share/icons/hicolor/scalable/freetube.svg
/squashfs-root/LICENSE.electron.txt
/squashfs-root/locales/hi.pak
/squashfs-root/locales/sk.pak
/squashfs-root/locales/sr.pak
/squashfs-root/locales/de.pak
/squashfs-root/usr/lib/libXss.so.1
/squashfs-root/freetube
/squashfs-root/locales/he.pak
/squashfs-root/locales/pt-PT.pak
/squashfs-root/locales/ru.pak
/squashfs-root/locales/pt-BR.pak
/squashfs-root/usr/lib/libappindicator.so.1
/squashfs-root/freetube.svg
/squashfs-root/locales/en-GB.pak
/squashfs-root/locales/af.pak
/squashfs-root/locales/et.pak
/squashfs-root/locales/ca.pak
/squashfs-root/usr/lib/libindicator.so.7
/squashfs-root/locales/ms.pak
/squashfs-root/locales/el.pak
/squashfs-root/icudtl.dat
/squashfs-root/locales/kn.pak
/squashfs-root/locales/ml.pak
/squashfs-root/resources.pak
/squashfs-root/locales/it.pak
/squashfs-root/locales/lt.pak
/squashfs-root/chrome-sandbox
/squashfs-root/freetube.desktop
/squashfs-root/locales/id.pak
/squashfs-root/vk_swiftshader_icd.json
/squashfs-root/locales/te.pak
/squashfs-root/locales/fi.pak
/squashfs-root/v8_context_snapshot.bin
/squashfs-root/chrome_200_percent.pak
/squashfs-root/locales/es-419.pak
I guess the font is in the file "/squashfs-root/resources/app.asar" .
What do you mean?

User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Re: antialiasing/font: Appimage programme does not follow the xfce setting

#4 Post by Duliwi »

OK. in "/squashfs-root/resources/app.asar" I have this:

Code: Select all

/dist/static/geolocations/es.json
/dist/static/locales/fr-FR.json.br
/dist/static/geolocations/zh-CN.json
/dist/static/locales/pt-BR.json.br
/dist/static/geolocations/fa.json
/dist/static/locales/tr.json.br
/dist/static/geolocations/da.json
/dist/static/locales/it.json.br
/dist/static/geolocations/ar.json
/dist/static/locales/eu.json.br
/dist/static/geolocations/es-AR.json
/dist/static/locales/da.json.br
/dist/static/geolocations/en-US.json
/dist/static/locales/nn.json.br
/dist/static/geolocations/it.json
/dist/static/locales/sk.json.br
/dist/static/geolocations/bg.json
/dist/static/locales/sl.json.br
/dist/renderer.js.LICENSE.txt
/dist/static/locales/en-US.json.br
/dist/imgs/textColorSmall.svg
/dist/static/locales/pt-PT.json.br
/dist/imgs/textNordicLightSmall.svg
/dist/static/locales/zh-CN.json.br
/dist/imgs/yt_logo_mono_dark.png
/dist/static/shaka-player-locales/vi.json
/dist/imgs/thumbnail_placeholder.svg
/dist/static/shaka-player-locales/be.json
/dist/imgs/iconDraculaLightSmall.svg
/dist/static/shaka-player-locales/cs.json
/dist/imgs/textCatppuccinFrappeDarkSmall.svg
/dist/static/shaka-player-locales/da.json
/dist/imgs/iconGruvboxLightSmall.svg
/dist/static/shaka-player-locales/iw.json
/dist/imgs/iconGruvboxDarkSmall.svg
/dist/static/geolocations/ro.json
/dist/fonts/shaka-materialiconsround-v108.woff2
/dist/static/geolocations/vi.json
/dist/renderer.bd20a147a3ffbc533d51.css
/dist/static/geolocations/id.json
/_icons/iconColor.png
/dist/static/geolocations/ru.json
/dist/static/locales/ta.json.br
/dist/static/geolocations/el.json
/dist/static/locales/uk.json.br
/dist/static/geolocations/eu.json
/dist/static/locales/hu.json.br
/dist/static/geolocations/nl.json
/dist/static/locales/is.json.br
/dist/static/geolocations/hr.json
/dist/static/locales/de-DE.json.br
/dist/static/geolocations/pl.json
/dist/static/locales/et.json.br
/dist/static/geolocations/en-GB.json
/dist/static/locales/gl.json.br
/dist/static/geolocations/nn.json
/dist/static/locales/vi.json.br
/dist/static/geolocations/fr-FR.json
/dist/static/locales/nb-NO.json.br
/dist/main.js.LICENSE.txt
/dist/static/locales/bg.json.br
/dist/imgs/iconDraculaDarkSmall.svg
/dist/static/locales/ar.json.br
/dist/imgs/textSolarizedDarkSmall.svg
/dist/static/locales/zh-TW.json.br
/dist/imgs/textWhiteSmall.svg
/dist/static/shaka-player-locales/sr.json
/dist/imgs/invidious-logo-light.svg
/dist/static/shaka-player-locales/id.json
/dist/imgs/textCatppuccinMochaLightSmall.svg
/dist/static/shaka-player-locales/pt-PT.json
/dist/imgs/invidious-logo-dark.svg
/dist/static/shaka-player-locales/sk.json
/dist/imgs/iconCatppuccinMochaLightSmall.svg
/dist/static/shaka-player-locales/lt.json
/dist/imgs/defaultBanner.png
/dist/static/shaka-player-locales/hu.json
/dist/botGuardScript.js
/dist/static/geolocations/ja.json
/dist/index.html
/dist/static/geolocations/sl.json
/_icons/iconColor.icns
/dist/static/geolocations/fi.json
/dist/static/locales/id.json.br
/dist/static/geolocations/cs.json
/dist/static/locales/cy.json.br
/dist/static/geolocations/he.json
/dist/static/locales/fi.json.br
/dist/static/geolocations/sk.json
/dist/static/locales/en-GB.json.br
/dist/static/geolocations/tr.json
/dist/static/locales/pt.json.br
/dist/static/geolocations/et.json
/dist/static/locales/pl.json.br
/dist/static/geolocations/ta.json
/dist/static/locales/sv.json.br
/dist/static/geolocations/lt.json
/dist/static/locales/ja.json.br
/dist/static/geolocations/sv.json
/dist/static/locales/es.json.br
/dist/static/external-player-map.json
/dist/static/locales/nl.json.br
/dist/imgs/textGruvboxDarkSmall.svg
/dist/static/locales/el.json.br
/dist/imgs/textDraculaDarkSmall.svg
/dist/static/locales/fa.json.br
/dist/imgs/textSolarizedLightSmall.svg
/dist/static/shaka-player-locales/ro.json
/dist/imgs/iconSolarizedLightSmall.svg
/dist/static/shaka-player-locales/sl.json
/dist/imgs/textBlackSmall.svg
/dist/static/shaka-player-locales/fi.json
/dist/imgs/textGruvboxLightSmall.svg
/dist/static/shaka-player-locales/fa.json
/dist/imgs/iconCatppuccinFrappeLightSmall.svg
/dist/static/shaka-player-locales/uk.json
/dist/imgs/textDraculaLightSmall.svg
/dist/static/shaka-player-locales/bg.json
/dist/imgs/iconCatppuccinFrappeDarkSmall.svg
/dist/static/geolocations/gl.json
/dist/main.js
/dist/static/geolocations/ca.json
/_icons/iconColor.ico
/dist/static/geolocations/be.json
/dist/static/locales/ro.json.br
/dist/static/geolocations/pt-PT.json
/dist/static/locales/es-AR.json.br
/dist/static/geolocations/zh-TW.json
/dist/static/locales/ko.json.br
/dist/static/geolocations/de-DE.json
/dist/static/locales/lt.json.br
/dist/static/geolocations/nb-NO.json
/dist/static/locales/hr.json.br
/dist/static/geolocations/uk.json
/dist/static/locales/be.json.br
/dist/static/geolocations/pt-BR.json
/dist/static/locales/ru.json.br
/dist/static/geolocations/pt.json
/dist/static/locales/es-MX.json.br
/dist/static/geolocations/is.json
/dist/static/locales/cs.json.br
/dist/static/geolocations/hu.json
/dist/static/locales/he.json.br
/dist/swiper-11.2.1.css
/dist/static/locales/sr.json.br
/dist/imgs/iconCatppuccinMochaDarkSmall.svg
/dist/static/locales/ca.json.br
/dist/imgs/iconNordicLightSmall.svg
/dist/static/invidious-instances.json
/dist/imgs/iconBlackSmall.svg
/dist/static/shaka-player-locales/ca.json
/dist/imgs/textCatppuccinMochaDarkSmall.svg
/dist/static/shaka-player-locales/no.json
/dist/imgs/iconColorSmall.svg
/dist/static/shaka-player-locales/el.json
/dist/imgs/iconWhiteSmall.svg
/dist/static/shaka-player-locales/hr.json
/dist/imgs/textCatppuccinFrappeLightSmall.svg
/dist/static/shaka-player-locales/sv.json
/dist/imgs/iconSolarizedDarkSmall.svg
/dist/static/geolocations/sr.json
/dist/fonts/Roboto-Regular.ttf
/dist/static/geolocations/es-MX.json
/dist/renderer.js
/_icons/iconColor.svg
/dist/static/geolocations/ko.json
/package.json
Fonts:

Code: Select all

/dist/fonts/Roboto-Regular.ttf
/dist/fonts/shaka-materialiconsround-v108.woff2
But even if it should be possible to replace the font now, this is not a practicable solution. FreeTub requires 1 to 2 updates per month to preserve its functionality. Then this procedure would have to be repeated every time. That is too complicated.

User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Re: antialiasing/font: Appimage programme does not follow the xfce setting

#5 Post by Duliwi »

OK. It took me about 20 hours. But now I got it.

I have unpacked "/squashfs-root/resources/app.asar".
Then in the unpacked app.asar I have removed the following file:

Code: Select all

/dist/fonts/Roboto-Regular.ttf
Then I have replaced in the file ...

Code: Select all

dist/renderer.bd20a147a3ffbc533d51.css
... the following:

replaced all entries "font-family: Roboto" through "font-family: Arial".

After I have packed app.asar new with the command:

Code: Select all

asar pack app.asar_entpackt app.asar
Now I have Arial without Antialiasing and with a good rendering.

Done.

------------------------------------------------------------------------------------------

Some more info that my be of interest:
To see which font freetube uses you can start the unpacked freetube like this:

Code: Select all

./freetube --enable-dev-tools
When freetube is started, you can press F12 and you get this:
k20250306-175611.jpg
Here you can check the font.

Some more curious info:

A) If I only delete the internal Roboto-Regular.ttf font in the app image and make nothing else, it uses Roboto Light from my system.

B) If I delete the internal Roboto-Regular font in the app image and also delete the Roboto Light fonts in my system, then it uses Arial, although fontconfig is demonstrably set to Tohamo and Tahoma is also set in the Xfce settings. And in this case Arial is rendered very well.

C) If I replace the internal font Roboto-Regular with Arial in the app image, but name the file Roboto-Regular.ttf so that FreeTube doesn't realise that I have replaced Roboto with Arial, then it actually uses Arial, but it is badly rendered.
You do not have the required permissions to view the files attached to this post.

User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Re: antialiasing/font: Appimage programme does not follow the xfce setting

#6 Post by Duliwi »

Big disappointment!

I thought I could simply insert the modified app.asar from version 0.23.2 into the new version after each update. That doesn't work. Apparently the version number is also stored in the app.asar and important bug fixes are also in the app.asar.

User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Re: antialiasing/font: Appimage programme does not follow the xfce setting

#7 Post by Duliwi »

OK. I have now created a complete complex *.sh to patch each update.


Note:
The package "nodejs" is also needed to ran "asar.js" and "npm", (which are both nodejs projects).
The script needs also the package "npm" to install "asar.js".
"asar.js" is needed to unpack app.asar from the appimage.

Post Reply

Return to “MX Help”