Thomas Mortagne <thomas.mortagne@...> writes:
1. Does
anyone have any ideas why this is failing?
What do you mean by failing and what result to you get exactly ?
These are the steps I made:
1. Paste the html into the edit window
2. Choose XWiki 2.0 from the Document Syntax Window
3. Choose OK to convert document.
4. Then I receive the following error:
Failed to convert to the selected syntax. If you want to use this syntax anyway,
you can select it again and choose not to perform the conversion.
This is the document I pasted
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<meta name="generator" content="pandoc" />
<title></title>
</head>
<body>
<h3 id="fonts-in-java">Fonts in Java</h3>
<p>Opentype fonts are not supported on Oracle JDK 1.6.0. You have to convert the
font to a truetype font using fontforge. Java appears to use fontconfig to
locate fonts. However it uses its own private copy, which often has bugs or
features missing from your distro supplied version.</p>
<p>Mac OS X and Linux process the fonts differently. Mac seems more forgiving of
bad font metadata. As an example, for one particular font I had to tweak the
meta data until the individual fonts, italic bold etc, appeared as one font in
Linux, i.e. as a single family. They need to appear as a single family for Java
to properly use differnt faces of a font, e.g. italic.</p>
<h3 id="adding-fonts">Adding fonts</h3>
<p>You can store the fonts in any of the font config search paths, including a
per user directory:</p>
<pre><code> cat > ~/.fonts.conf <<EOF
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Private font directory -->
<dir>~/fonts</dir>
</fontconfig>
EOF
</code></pre>
<p><em>NOTE:</em> For the per user directory to work the
<code>$HOME</code>
environment variable must be set.</p>
<h3 id="listing-available-fonts">Listing available fonts</h3>
<p>Use the below java code to verify that a font has been made available in
java:</p>
<pre><code> cat > ListFonts.java <<EOF
import java.awt.GraphicsEnvironment;
public class ListFonts {
public static void main(String args[]){
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
for(String font:e.getAvailableFontFamilyNames()){
System.out.println(font);
}
}
}
EOF
javac ListFonts.java
java ListFonts
</code></pre>
</body>
</html>