How to configure OWB to use CJK fonts?
  • Butterfly
    Butterfly
    insurgent
    Posts: 64 from 2007/7/8
    I have obtained some free Chinese / Japanese / Korean (CJK) TrueType fonts. How do I configure OWB 1.8 to use those fonts?

    I have copied the new font file to System:Fonts/_ttf folder but they're not visible in MOS Preferences > Fonts. What is required to correctly install these fonts?
    Are there any configuration files that have to be set for OWB in System:Applications/OWB/conf/font folder?
    Do I need to change encoding settings in OWB Settings > Preferences > Fonts?
    The current encoding seting in OWB is ISO 8859-1 but there is no auto-detect option like for some other browsers - does it matter?

    I'm trying to setup with these fonts:
    http://www.chinesetranslationpro.com/chinese-fonts.php

    I never had to do this from scratch so any help would be really appreciated... Thanks!
    Registered MOS 2.7 + Pack Ultimate 1.6.2 running on:
    Power Mac G4 FW800 1.42GHz 2GB / Radeon 9000 Pro 128MB / SB Live! / NEC USB 2.0 / SuperDrive
    Mac Mini G4 1.5GHz 1GB / 64MB VRAM / SuperDrive
    Dell UltraSharp 2407WFP 1920x1200
    PowerBook G4 ready :-)
  • »21.06.10 - 12:42
    Profile
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    I don't know if these fonts are suitable, but this one works for me: kochi-mincho-subst.ttf (google for it). Just copy it to sys:fonts/_ttf/. It will be visible in OWB font settings then (but it doesn't matter, all is handled automatically anyway).

    Then, you might also want to edit conf/font/font.conf and remove the MOSSYS:fonts/_ttf/ line (like suggested in the readme), since these fonts cause additional substitutions that can sometimes take a very long time.

    In any case, be warned that japanese/chinese fonts add quite some overhead in rendering, and they are so large they don't fit in the font cache, so they are often reloaded from disk at runtime (which can be annoying, and slow, considering the font file is 8MB large :))
  • »21.06.10 - 14:31
    Profile Visit Website
  • Butterfly
    Butterfly
    insurgent
    Posts: 64 from 2007/7/8
    Thanks Fab, that's fantastic! It worked just as you said. In addition to the Japanese fonts you mentioned, I have also downloaded Arphic ShanHeiSun Uni font which are Chinese fonts sometimes included in Linux distros. I had no need for Korean font.

    In case some other forumer is in the same need, I found the following a pretty good resource:
    Alphabetical listing of Unicode fonts

    Another small issue that I have encountered is that fonts are not correctly displayed in tab title in OWB. Cosmetic issue really, does not impact on usability. :-)

    BTW, why is rendering those fonts slow - is this something inheritent in WebKit engine or is there another reason?

    Thanks!
    Registered MOS 2.7 + Pack Ultimate 1.6.2 running on:
    Power Mac G4 FW800 1.42GHz 2GB / Radeon 9000 Pro 128MB / SB Live! / NEC USB 2.0 / SuperDrive
    Mac Mini G4 1.5GHz 1GB / 64MB VRAM / SuperDrive
    Dell UltraSharp 2407WFP 1920x1200
    PowerBook G4 ready :-)
  • »22.06.10 - 11:43
    Profile
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    There are several reasons for the slowness (though i didn't profile in detail):
    - They're large, and they seem to exceed fontconfig (or cairo?) cache, which means they're often reloaded from disk, which is obviously slow.
    - Complex drawing, using cairo. Doesn't help with speed either.

    And yes, it's normal it's not displayed properly in the tabs. MUI doesn't support unicode in the standard gadgets like text/string and so on.
  • »22.06.10 - 13:22
    Profile Visit Website