Page 1 of 1

Adding a Japanese font to Oxygen XML

Posted: Thu Jun 11, 2009 1:53 pm
by stefanhinz
I'm using Oxygen XML 10.2 on Linux/KDE. In my KDE-based applications like kate, fonts like Adobe Courier are available (and used) that allow me to properly display and edit Japanese text (DocBook XML, UTF-8).

In Oxygen XML, only a fraction of the KDE fonts are available, and there's not a single font that would display Japanese characters correctly. Instead, all I get is squares.

Any pointers as to how configure Oxygen XML (and/or the JVM) so that it allows to select Adobe Courier as the "editor" font are greatly appreciated!

Best regards,

-Stefan

Re: Adding a Japanese font to Oxygen XML

Posted: Thu Jun 11, 2009 3:01 pm
by sorin_ristache
Hello,

Do you mean Adobe Courier and other fonts capable to display Japanese text are not available in the Font dialog opened from the Editor button available from menu Options -> Preferences -> Fonts? Are they TrueType fonts or PostScript Type 1 fonts? If not they cannot be loaded by the Java virtual machine so they will not be available in the Font dialog in Oxygen. You have to install a TrueType font or a PostScript Type 1 one that is also capable to display Japanese text in KDE or in the lib/fonts directory of the JRE that runs Oxygen (by default on Linux this JRE is located in the directory [Oxygen-install-dir]/jre).


Regards,
Sorin

Re: Adding a Japanese font to Oxygen XML

Posted: Fri Jun 26, 2009 7:47 pm
by stefanhinz
Yes, all my KDE fonts are TrueType fonts. I've looked at the Oxygen 10.2 installation directory, but I don't think there are any fonts in the jre/ subdirectory. Rather than that, there are 2 files that seem to relate to fonts and SuSE Linux:

artemis/opt/Oxygen XML Editor 10/jre/lib # l *SuSE*
-r--r--r-- 1 root root 1678 10. Nov 2008 fontconfig.SuSE.bfc
-r--r--r-- 1 root root 1972 10. Nov 2008 fontconfig.SuSE.properties.src

The .bfc file is binary, and the .src file contains this:

Code: Select all


# @(#)linux.fontconfig.SuSE.properties	1.2 03/10/17
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
#
# Version
version=1
# Component Font Mappings
serif.plain.latin-1=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.latin-1=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.latin-1=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.latin-1=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
sansserif.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.latin-1=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.latin-1=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.latin-1=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
monospaced.plain.latin-1=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.latin-1=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.latin-1=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.latin-1=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialog.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.latin-1=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.latin-1=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.latin-1=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialoginput.plain.latin-1=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.latin-1=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.latin-1=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.latin-1=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
# Search Sequences
sequence.allfonts=latin-1
# Exclusion Ranges
# Font File Names
So what I did was a) install the Lucida fonts (TrueType fonts), then selected Lucida Sans Unicode as the default editor font in Oxygen. Still no luck, though; Japanese characters still show up as squares.

Any clues what I'm missing?

Re: Adding a Japanese font to Oxygen XML

Posted: Mon Jun 29, 2009 11:18 am
by sorin_ristache
Lucida Sans Unicode does not have Japanese characters. You have to select a font that has Japanese characters in the Font dialog opened from Preferences -> Fonts. Such a font is Arial Unicode MS.

The font does not have to be in the [Oxygen-dir]/jre directory, if it is installed on your system and it is a TrueType font or a PostScript Type 1 one the Java virtual machine will load it.


Regards,
Sorin

Re: Adding a Japanese font to Oxygen XML

Posted: Mon Jun 29, 2009 1:49 pm
by stefanhinz
Thanks for clarifying!
Arial Unicode MS can be purchased for $99; see http://en.wikipedia.org/wiki/Arial_Unicode.
There's a free alternative on Linux, though: Sazanami Mincho (or Gothic). From what I can tell, it supports Japanese characters fine. Hope this helps someone.
Thanks again for helping me sort this out!