You are not logged in.

#1 2018-01-09 13:17:30

abdulhakeem
Member
From: Chicagoland
Registered: 2016-07-31
Posts: 23
Website

[GNOME] How to Set Default Font for Arabic?

I primarily use English and I know how to change default English fonts in Gnome Tweaks. However I also read and type and Arabic from time to time, and I'm trying to find a way to choose the default font for Arabic text, as I really don't like the default Arabic font that is used, but I'm not sure how to change it. Gnome Tweaks only lists options for English.

I'd like to be able to set the default font for all Arabic text to Noto Naskh Arabic

Does anyone know of a way to do this? Do I need to generate a new locale or something? I think I only generated en_US at installation


And the worldly life is not but amusement and diversion; but the home of the Hereafter is best for those who fear Allah, so will you not reason? {6:32}

Offline

#2 2018-01-09 13:26:14

exad
Member
Registered: 2016-11-15
Posts: 33

Re: [GNOME] How to Set Default Font for Arabic?

Hmm, I found this thread that might be helpful to you.

https://bbs.archlinux.org/viewtopic.php?id=9663

Sorry I don't have much experience with arabic fonts

Offline

#3 2018-01-09 14:59:59

seth
Member
Registered: 2012-09-03
Posts: 17,287

Re: [GNOME] How to Set Default Font for Arabic?

Not. At least not the way I imagine what you want.
Iffff your preferred arabic font doesn't contain latin letters or your preferred latin font doesn't contain arabic ones, you can configure fontconfig to use one as fallback for the other. Otherwise this isn't going to work (font selection by utf-8 range is afaiu not possible)

DISPLAY=:0 FC_DEBUG=4 pango-view --font="Noto Naskh Arabic" -t "a" | grep family
DISPLAY=:0 FC_DEBUG=4 pango-view --font="Source Sans" -t "ب" | grep family

Notice that the font names used above have to be accurate, grep for the font name in fc-list

Offline

#4 2018-01-10 18:46:03

haricot
Member
Registered: 2017-12-09
Posts: 7

Re: [GNOME] How to Set Default Font for Arabic?

If you have gnome tweaks already installed you may edit the css file: sudo nano /usr/share-gnome-shell/theme/gnome-shell.css.
if you scroll down to font-family you can replace the offered fonts with your choice. Download  the ttf font noto nashk arabic from its website arabicfont.net and install it in /usr/share /fonts.
This may help you but there's no quarantee. If you run into trouble doing this there is plenty of gnome experts to assist you

Offline

#5 2018-01-10 20:25:29

ooo
Member
Registered: 2013-04-10
Posts: 1,613

Re: [GNOME] How to Set Default Font for Arabic?

I don't think there's any way to do this via GUI, but you can set fallback fonts with fontconfig as seth suggested. There's a configuration example for japanese fonts in wiki: https://wiki.archlinux.org/index.php/Fo … s#Japanese


@haricot,
It's great that you're trying to help, but you should at least have some idea what you're talking about.

First, you're describing how to switch the font for gnome-shell theme, which has nothing to do with the issue in first post. Second, there haven't been /usr/share-gnome-shell/theme/gnome-shell.css since gnome 3.12 or so.
Third, I don't know who the "gnome experts" you are talking about are, but if you're going to (mis)guide people, you should at least be prepared to assist with your own instructions, and not leave that to others.

Offline

#6 2018-01-12 20:13:15

abdulhakeem
Member
From: Chicagoland
Registered: 2016-07-31
Posts: 23
Website

Re: [GNOME] How to Set Default Font for Arabic?

Thanks for the responses everyone. I might have to try tweaking fontconfig as a few have suggested. Will update if I can get it to work


And the worldly life is not but amusement and diversion; but the home of the Hereafter is best for those who fear Allah, so will you not reason? {6:32}

Offline

#7 2018-05-07 02:17:23

darmanto
Member
Registered: 2018-05-07
Posts: 1

Re: [GNOME] How to Set Default Font for Arabic?

Hi @abdulhakeem, did you get it working for you? could you please share, as I'm also having same problem. Syukron.

Offline

#8 2020-08-01 19:30:50

shakram02
Member
Registered: 2020-08-01
Posts: 1

Re: [GNOME] How to Set Default Font for Arabic?

Hello, I had the same problem and I managed to overcome it by modifying

/etc/fonts/conf.d/40-nonlatin.conf

If it doesn't exist, try:

/etc/fonts/fonts.conf

edit font names for each family (serif, sans serif and cursive). My main problem was the cursive font family.

Offline

#9 2020-08-01 20:46:36

abdulhakeem
Member
From: Chicagoland
Registered: 2016-07-31
Posts: 23
Website

Re: [GNOME] How to Set Default Font for Arabic?

@darmanto no I gave up on trying, but I did find a browser extension that helps with Arabic font rendering in Chrome and Firefox:

https://chrome.google.com/webstore/deta … jfhn?hl=en

https://addons.mozilla.org/en-US/firefo … src=search



@shakram02 thanks I will try that


And the worldly life is not but amusement and diversion; but the home of the Hereafter is best for those who fear Allah, so will you not reason? {6:32}

Offline

Board footer

Powered by FluxBB