[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • To: xml-dev@l...
  • Subject: The power of Openoffice.org, XML, the Unix toolkit, and a little hacking
  • From: John Cowan <jcowan@r...>
  • Date: Tue, 14 Oct 2003 14:03:56 -0400
  • User-agent: Mutt/1.4.1i

unix toolkit
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@r...
that the Wall had no other side.                http://www.ccil.org/~cowan
        --Arthur C. Clarke, "The Wall of Darkness"

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.