Site Search:
 
Speak Korean Now!
Teach English Abroad and Get Paid to see the World!
Korean Job Discussion Forums Forum Index Korean Job Discussion Forums
"The Internet's Meeting Place for ESL/EFL Teachers from Around the World!"
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

F!@#ing Hangul Fonts--Linux Grandmaster Wanted!

 
Post new topic   Reply to topic    Korean Job Discussion Forums Forum Index -> Technology Forum
View previous topic :: View next topic  
Author Message
Delirium's Brother



Joined: 08 May 2006
Location: Out in that field with Rumi, waiting for you to join us!

PostPosted: Mon Jul 17, 2006 11:53 pm    Post subject: F!@#ing Hangul Fonts--Linux Grandmaster Wanted! Reply with quote

Okay, I have a lot of hard-won knowledge of linux (slackware to be precise), but I just can't deal with figuring out how to install hangul fonts for web applications. I don't want to read anymore confusing text docs either. I need the help of someone who can guide me through the process with PMs. If you are a linux grandmaster up to the challenge, PM me. Please don't post anymore links (and snide comments from Mac and Windows people will not be helpful either).
Back to top
View user's profile Send private message Visit poster's website
Demophobe



Joined: 17 May 2004

PostPosted: Tue Jul 18, 2006 12:21 am    Post subject: Reply with quote

some Korean Linux-using dude wrote:
Korean language support
Seeing Korean characters
Standard XFree86/Xorg comes with 3 Daewoo fonts for Korean characters:

* hanglm16.pcf.gz (-daewoo-mincho-medium-r-normal--16-120-100-100-c-160-ksc5601.1987-0)
* hanglm24.pcf.gz (-daewoo-mincho-medium-r-normal--24-170-100-100-c-240-ksc5601.1987-0)
* hanglg16.pcf.gz (-daewoo-gothic-medium-r-normal--16-120-100-100-c-160-ksc5601.1987-0)

Although application like Hanterm uses them, Firefox, Thunderbird, Mozilla, and other GTK+ applications uses TTF and /etc/fonts/fonts.conf instead. So, here is what I did to see Korean characters.

1.

Download and extract Cyberbit.ttf which is all-in-one package, consisting of Cyberbase (European) and CyberCJK (Chinese, Japanese, Korean) fonts. In addition, you can download Un Fonts which is TTF fonts converted from HLaTeX fonts.
2. Install the fonts to /usr/local/fonts/TTF:

cp Cyberbit.ttf /usr/local/fonts/TTF
cd /usr/local/fonts/
mkfontscale */ # generates 'fonts.scale'
mkfontdir */ # generates 'fonts.dir'
fc-cache

Then, put

<dir>/usr/local/fonts</dir>

in /etc/fonts/local.conf, so that the fonts are picked up by the applications.

Typing Korean characters

In addition to seeing Korean chars, I needed to type English/Korean chars as well. On stock Slackware-9.1,

GTK_IM_MODULE=hangul

will allow you to type Korean chars, but only Korean. Applications (Firefox, Thunderbird) will not accept English letters. You need

GTK_IM_MODULE=hangul2

Since 'hangul2' is not found in /etc/gtk-2.0/gtk.immodules in Slackware-9.1, you need to download imhangul package, and compile/install as usual. For post-install script (./install/doinst.sh in Slackware package), I used

IM_HANGUL_GTK_IMMODULE_FILE=/etc/gtk-2.0/gtk.immodules
DIR=/etc/gtk-2.0

test -d $DIR || mkdir -p $DIR
gtk-query-immodules-2.0 > $IM_HANGUL_GTK_IMMODULE_FILE

Just like Hanterm, <Shift-Space> will toggle English/Korean mode, and <F9> will enable Hanja mode.


Help?
Back to top
View user's profile Send private message
Delirium's Brother



Joined: 08 May 2006
Location: Out in that field with Rumi, waiting for you to join us!

PostPosted: Tue Jul 18, 2006 1:22 am    Post subject: Reply with quote

Thanks for the response, but I'm still screwed.

Demophobe wrote:
some Korean Linux-using dude wrote:
Korean language support
Seeing Korean characters
Standard XFree86/Xorg comes with 3 Daewoo fonts for Korean characters:

* hanglm16.pcf.gz (-daewoo-mincho-medium-r-normal--16-120-100-100-c-160-ksc5601.1987-0)
* hanglm24.pcf.gz (-daewoo-mincho-medium-r-normal--24-170-100-100-c-240-ksc5601.1987-0)
* hanglg16.pcf.gz (-daewoo-gothic-medium-r-normal--16-120-100-100-c-160-ksc5601.1987-0)
Understood, so far.
Although application like Hanterm uses them, Firefox, Thunderbird, Mozilla, and other GTK+ applications uses TTF and /etc/fonts/fonts.conf instead Of course not, why would it be easy!!!. So, here is what I did to see Korean characters.

1.

Download and extract Cyberbit.ttf which is all-in-one package, consisting of Cyberbase (European) and CyberCJK (Chinese, Japanese, Korean) fonts. In addition, you can download Un Fonts which is TTF fonts converted from HLaTeX fonts. Okay, got it.

2. Install the fonts to /usr/local/fonts/TTF: Don't have this folder. Am I supposed to create it?

cp Cyberbit.ttf /usr/local/fonts/TTF Okay
cd /usr/local/fonts/ Okay
mkfontscale */ # generates 'fonts.scale' Do I input an asteriks and the slash or does that stand for a variable? What one?
mkfontdir */ # generates 'fonts.dir' Same question
fc-cache

Then, put


<dir>/usr/local/fonts</dir>

in /etc/fonts/local.conf, so that the fonts are picked up by the applications.
Don't have this file either. Do I create it? Or is it supposed to be there?


Help? Only partly as you can see


Thanks anyway.
Back to top
View user's profile Send private message Visit poster's website
Demophobe



Joined: 17 May 2004

PostPosted: Tue Jul 18, 2006 3:18 am    Post subject: Reply with quote

some other dude wrote:
Apparently Slackware 9.1 comes with a pre-prepared folder for TTF fonts (found at /usr/X11/lib/fonts/TTF).

In addition, all filenames need to be lower case. Use this Perl one-liner to do just that.

find . | perl -ne 'chomp; next unless -e; $new=lc($_); rename $_,$new'

You will then need to generate the fonts.dir and fonts.scale files as well as the encodings using the mkfontscale and mkfontdir utilities which come with XFree86 4.3 (The X-Server in Slackware 9.0). Type the following in the directory in which you have placed your fonts...

/usr/X11R6/bin/mkfontscale /usr/local/share/fonts/ttfonts/
/usr/X11R6/bin/mkfontdir /usr/local/share/fonts/ttfonts/
/usr/X11R6/bin/mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings

The X server supplied with Slackware has a font server capable of displaying TrueType fonts built in, we just need to let it know where the directory containing the fonts is. Open /etc/X11/XF86Config and add FontPath "/usr/local/share/fonts/ttfonts" (or whatever your font path is,) to the top of the list of FontPaths. Whilst you are editing the file, make sure that the line Load "freetype" (In the "Module" section) is uncommented.

You also need to edit the file /etc/fonts/fonts.conf. Add <dir>/usr/local/share/fonts/ttfonts/</dir> (or whatever the path to your font directory is) in amongst the other paths to font directories.

Although editing the file fonts.conf works in Slackware 9.1 it is warned against - instead try editing /etc/fonts/local.conf, this may not be necessary if you use the existing TTF fonts directory metioned above in Slackware 9.1


yet another dude wrote:
Adding TrueType fonts

A modern Linux distribution comes with not one but two font-handling systems: the one built into X, which serves fonts to Xlib, Motif and GTK1 apps; and fontconfig, which serves fonts to GTK2 and QT apps.

New fonts need to be added to both.

You probably have a collection of TrueType fonts already. If not, then at least install Microsoft's Core Fonts for the Web (which you can usually find on linuxpackages.net), and a Unicode font such as Bitstream Cyberbit, because you need them to properly display webpages.

Put all the .ttf files in �/usr/local/share/fonts�.

Now...

cd /usr/local/share/fonts
su -c '/usr/X11R6/bin/mkfontdir .'
su -c '/usr/X11R6/bin/mkfontscale .'

This should create fonts.dir and fonts.scale files with entries for each one of the fonts in �/usr/local/share/fonts�.

Now copy �/etc/fonts/fonts.conf� to �/etc/fonts/local.conf�. Edit local.conf and delete everything between the <fontconfig> and </fontconfig> tags. Between those two tags write one line:

<dir>/usr/local/share/fonts</dir>

Execute �su -c '/usr/X11R6/bin/fc-cache -f -v'�.

Now open �/etc/X11/xorg.conf�. Locate the fontpath lines and add one for �/usr/local/share/fonts/�.

Restart X. You will see your new fonts listed in the outpout of both xlsfonts (or xfontsel) and fc-list, which respectively lists the fonts available to X and Fontconfig.


I think this covers it.....?
Back to top
View user's profile Send private message
Delirium's Brother



Joined: 08 May 2006
Location: Out in that field with Rumi, waiting for you to join us!

PostPosted: Tue Jul 18, 2006 3:35 am    Post subject: Reply with quote

Thanks, that's medal worthy assistance, finally. I nominate you for Linux Grandmaster of Dave's ESL Cafe.

p.s. this board needs a medal system.

p.p.s. Adding this to a sticky somewhere would be nice.
Back to top
View user's profile Send private message Visit poster's website
Demophobe



Joined: 17 May 2004

PostPosted: Tue Jul 18, 2006 3:46 am    Post subject: Reply with quote

Delirium's Brother wrote:
Thanks, that's medal worthy assistance, finally. I nominate you for Linux Grandmaster of Dave's ESL Cafe.

p.s. this board needs a medal system.

p.p.s. Adding this to a sticky somewhere would be nice.



Ahh....the irony....and then the comedy....a sticky for Linux.... Wink

dbee is The Man with Linux, but he's not around too much these days.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Korean Job Discussion Forums Forum Index -> Technology Forum All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


This page is maintained by the one and only Dave Sperling.
Contact Dave's ESL Cafe
Copyright © 2018 Dave Sperling. All Rights Reserved.

Powered by phpBB © 2001, 2002 phpBB Group

TEFL International Supports Dave's ESL Cafe
TEFL Courses, TESOL Course, English Teaching Jobs - TEFL International