LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware and Thai fonts (https://www.linuxquestions.org/questions/slackware-14/slackware-and-thai-fonts-891023/)

SqdnGuns 07-11-2011 01:17 AM

Slackware and Thai fonts
 
Someone may find this useful so I am posting it.

My wife is Thai and I have been struggling with getting Thai fonts to render properly in Slackware, especially with Firefox since this is her source of news back home.

After some digging around the net with Google, I came across these fonts:

http://linux.thai.net/pub/thailinux/...-0.4.15.tar.gz

I followed the example install directions and the fonts are looking great now. Before they were almost unreadable. Another plus is now I can read all files that are in Thai.

Code:

# cd /usr/share/fonts/truetype
# tar xzf ~/Download/thai-ttf-0.4.15.tar.gz
# mv thai-ttf-0.4.15/etc/fonts/conf.avail/* /etc/fonts/conf.avail
# ln -s /etc/fonts/conf.avail/64-ttf-thai-tlwg.conf /etc/fonts/conf.d/
# ln -s /etc/fonts/conf.avail/89-ttf-thai-tlwg-synthetic.conf /etc/fonts/conf.d/
# rm -rf thai-ttf-0.4.15/etc

Screenshot: http://dl.dropbox.com/u/1574277/Screenshot-07102011.png

Hope someone else finds this post useful.

zakame 04-14-2015 05:38 AM

And useful indeed! Glad to come across this as I need to set Thai font support for Chrome and others. Will put this on docs.slackware.com for posterity.

WiseDraco 04-14-2015 06:14 AM

very strange. i thinked, nowadays, utf-8 / utf-16 contains all world possible \ usage symbols ?

Didier Spaier 04-14-2015 06:54 AM

Quote:

Originally Posted by WiseDraco (Post 5347151)
very strange. i thinked, nowadays, utf-8 / utf-16 contains all world possible \ usage symbols ?

UTF-8 is a standard for encoding well defined characters, each associated to a specific name. A handy table is provided here. But to physically draw a character on the screen you need to associate to it a glyph that comes from a file, containing data that represent a set of straight line segments and quadratic Bézier curves in the case of True Type fonts.

That's a lot of work and each True Type font includes a limited number of these glyphs.

You can make your own font or modify existing ones in Slackware using fontforge.

SqdnGuns 04-20-2015 02:40 PM

Wow, almost 3 years and someone did find it useful!!

Strykar 10-22-2015 09:47 PM

Relevant after years indeed.
I just tried this with 0.4.17 and Apache still displays the Thai fonts incorrectly.
Code:

à¹„àž—àž¢ à¹„àž—àž¢ | zombieTH àžªàž‡àž„àž£àž²àž¡ Engineer I
Oddly, rrd graphs on the same system display it correctly:
Code:

ไทย ไทย | zombieTH สงคราม Engineer I
Also, the directory /usr/share/fonts/truetype does not exist in 14.1
I tried creating it and copying the fonts over and also copying them to the existing /usr/share/fonts/TTF but no cigar

Code:

root@slack14:/tmp/thai/thai-ttf-0.4.17# fc-cache -vf
Fontconfig warning: "/etc/fonts/conf.d/89-ttf-thai-tlwg-synthetic.conf", line 24: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/89-ttf-thai-tlwg-synthetic.conf", line 34: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/89-ttf-thai-tlwg-synthetic.conf", line 46: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/89-ttf-thai-tlwg-synthetic.conf", line 59: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/89-ttf-thai-tlwg-synthetic.conf", line 71: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/89-ttf-thai-tlwg-synthetic.conf", line 84: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/89-ttf-thai-tlwg-synthetic.conf", line 96: Having multiple values in <test> isn't supported and may not work as expected
/usr/share/fonts/OTF: caching, new cache contents: 23 fonts, 0 dirs
/usr/share/fonts/TTF: caching, new cache contents: 168 fonts, 0 dirs
/usr/share/fonts/Type1: caching, new cache contents: 64 fonts, 0 dirs
/usr/share/fonts/Speedo: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cyrillic: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/misc: caching, new cache contents: 95 fonts, 0 dirs
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: skipping, no such directory
/var/cache/fontconfig: cleaning cache directory
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded


foxmean 05-05-2017 01:32 PM

Thank you very much all of you
 
This post is really helpful for me;and I'm quite sure that it help many Thais a lot.
***Please note, I'm using Slackware GNU/Linux***
As the time goes by and this solution is not exactly works for me now;so I'm try to figure out what solution could be in "this" time and I found it below.

For Reading Thai
1. check out this font and choose the new one to download (such as thai-ttf-0.4.17.tar.gz).
2. And Follow step in this Slack's Document
***Note 2. is depend on your Distro***

My solution can be summarize in this code
Please substitution thai-ttf-0.4.17.tar.gz with the version you selected
Code:

$ wget https://linux.thai.net/pub/thailinux/software/thai-ttf/thai-ttf-0.4.17.tar.gz
$ tar xzf thai-ttf-0.4.17.tar.gz
$ cd thai-ttf-0.4.17
$ sudo cp *.ttf /usr/share/fonts/TTF
$ sudo cd /usr/share/fonts/TTF
$ sudo mkfontdir && sudo mkfontscale
$ sudo fc-cache -f -v
$ sudo reboot # note that you can run $ pkill x and login as CLI then run $ startx instead

For Typing in Thai simply use your GUI configuration to add Keyboard layout. If you not install X-windows (also Wayland as well), you (maybe) can't see this webpage.

I hope this were useful for someone in the future.

X00D45 10-06-2017 02:15 AM

LoL
Thanks A LOT FOXMEAN !!!!
since I updated to Slackware 14.2 I was looking/waiting for a solution to render thai fonts without luck....
Cheers my friend!!!

SqdnGuns 10-07-2017 11:10 AM

Good to see this post is doing well for others over 6 years later!!

X00D45 10-11-2017 01:33 AM

and thanks to you too "SqdnGuns" , who made the first post...
I wished I had read your post in more detail , and may be I would not have spent a year waiting for the answer from "Foxmean" :-D

X00D45 01-23-2018 10:05 AM

Also I just found today, Lanna script fonts (Thai Tam ) from kengtung.org

I hope someone find this useful :)


All times are GMT -5. The time now is 05:46 AM.