OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   The power of Openoffice.org, XML, the Unix toolkit, and a little hacking

[ Lists Home | Date Index | Thread Index ]

I'm developing the tutorial handout (which is also the presentation
slides) for my XML 2003 tutorial, "Moving Toward XHTML 2.0".
<plug>Come see me.  I'll also be repeating my 2002 tutorial on RELAX NG.</plug>

I started out by cloning the RELAX NG presentation, which started out oas
a clone of the Unicode presentation I did in 2001 and 2002.  I decided
to use OpenOffice.org[1] this time, though, rather than PowerPoint.
(I had actually used OOo before but had worked exclusively in ppt format.)
After a frenzied day of writing on Sunday, I had something with a random
mixture of basic fonts: Courier New for monowidth text, and Arial Unicode
MS (held over from the Unicode presentation) and Times New Roman for
everything else.  Urgh.

I wanted a sans serif font that looked better than Arial.  I had read the
docs on Gentium[2], a Latin/Greek font now being distributed by SIL, and
it sounded good.  I fetched it and applied it at a few selected spots
in my presentation: it looked good, too, and I suspect it'll look even
better blown up and projected.

How to clean up the font mess?  Just thinking about trying to fix this
with the UI gave me the willies.  I poked around a bit to see if there
was a font substitution dialogue box, but the one I found didn't seem
to do what I wanted.

How to fix it, then?  Easy.  I used Unix (meaning, in this case, the
Cygwin[3] toolkit on Windows) tools to fix things up.  Unzip took the
OOo file apart for me, and grep found that two files (content.xml and
styles.xml) contained the strings "Arial Unicode MS" and "Times New
Roman".  I opened each file in ex[4] (only two lines long, each of them)
and substituted each of these strings with "Gentium".  Zip put the files
back into the OOo .sxi file again, and I reopened.

Didn't work.

Mozilla Firebird's XML-tree view mode showed me that in the declaration
of styles in content.xml, some instances of 'fo:font-family="Gentium"'
were followed by 'style:font-family-generic="swiss"'.  Aha, I thought,
the program thinks I want serifed Gentium, which does not exist.
Another pass with ex removed the above attribute, and zip merged the
new version of content.xml back into the .sxi file.

Didn't work.  It claimed the font was Gentium, but still showed the old cruft.

I made a trivial change, reversed it, and did a Save.  Opening the
document now shows beauuuuutiful Gentium everywhere.

[1] http://www.openoffice.org
[2] http://scripts.sil.org/cms/scripts/page.php?site_id=nrsl&item_id=Gentium
[3] http://www.cygwin.com
[4] I'm an "ex" troglodyte; no vi or emacs for me.  Deal with it.

-- 
But that, he realized, was a foolish            John Cowan
thought; as no one knew better than he          jcowan@reutershealth.com
that the Wall had no other side.                http://www.ccil.org/~cowan
        --Arthur C. Clarke, "The Wall of Darkness"




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS