OpenOffice .odt Opened Up – Part 3a: Styles/font-face-decls
Overview
In my last article, OpenOffice .odt Opened Up – Part 2: Meta and Settings, I discussed two of the four top level subdocument elements, office:document-meta and office:document-settings. In this article, I will be taking a closer look at the office:document-styles element, in particular the office:font-face-decls sub-element. As before, my test cases where produced with the following software:
- SuSE Linux 10.1
- OpenOffice 2.0.2.7.1
- zip 2.31 (March 8th 2005)
The Relax-NG schema language is used to define elements of the specification. The original source document can be downloaded here oo_part1.odt, and in particular the subdocument under observation can be downloaded here styles.xml.
The office:document-styles element
The office:document-styles root element contains all font face declarations, named styles, automatic styles and master styles need for the document.
office:document-styles schema
<element name="office:document-styles">
<ref name="office-document-common-attrs" />
<ref name="office-font-face-decls" />
<ref name="office-styles" />
<ref name="office-automatic-styles" />
<ref name="office-master-styles" />
</element>
</define>
Next let us explore the office:font-face-decls sub-element.
The office:font-face-decls element
This element is actually duplicated in the top-level office:document-content element. A few simple test indicate that, if differences exist in the two sub-elements, complete element omissions in one are populated by the other, and where two elements differ in content the definition in office:document-styles takes precedence, though this behavior is not defined explicately in the specification.
The office:font-face-decls element consist of style:font-face elements. If you remember, we generated our test document by selecting text from a pdf and pasting that text into an .odt. This generated such style:font-face elements as follows:
svg:font-family="EIDQUI+CMSLTT10"/>
<style:font-face style:name="FFWLFJ+CMR10"
svg:font-family="FFWLFJ+CMR10"/>
<style:font-face style:name="GRVNVC+CMTT9"
svg:font-family="GRVNVC+CMTT9"/>
<style:font-face style:name="HJCZVV+CMTT8"
svg:font-family="HJCZVV+CMTT8"/>
<style:font-face style:name="Lucidasans1"
svg:font-family="Lucidasans"/>
With the exception of the last element, this looks pretty ugly. The following is a sample of style:font-face elements taken from a newly created document.
svg:font-family="’HG Mincho Light J’"
style:font-pitch="variable"/>
<style:font-face style:name="Lucidasans"
svg:font-family="Lucidasans"
style:font-pitch="variable"/>
<style:font-face style:name="Thorndale AMT"
svg:font-family="’Thorndale AMT’"
style:font-family-generic="roman"
style:font-pitch="variable"/>
<style:font-face style:name="Albany AMT"
svg:font-family="’Albany AMT’"
style:font-family-generic="swiss" />
The reason for this is that OpenDocument font face declarations directly correspond to the @font-face font description of CSS2 and the <font-face> element of SVG, but have two extensions.
- OpenDocument font face declarations optionally may have an unique name. This name can be used inside styles as the value of the style:font-name attribute to immediately select a font face declaration. If a font face declaration is referenced this way, the steps described in CSS2 font matching algorithms for selecting a font declaration based on the font-family, font-style, font-variant, font-weight and font-size descriptors will not take place, but the referenced font face declaration is used directly.
- Some additional font descriptor attributes may exist.
Which basically means svg:font-family="EIDQUI+CMSLTT10" uses the SVG font matching algorithm and not the named font. SVG is beyond the scope of this article. Reference material for SVG font declarations can be found here.
Back to the bigger picture. The benefit we can observe from this, is that a predefined set of fonts can be applied to an .odt. By doing this we can ensure that documents contain a consistent set of fonts and eliminate potential redundancy or functional overlap. Care must be taken that if a style:font-face is replaced, that all style:font-name, style:font-name-complex and style:font-name-asian attributes are examined and replaced as well. While potential size gains are arguably minimal, gains in consistent look and output are immeasurable.
One option Open Office gives the user to tackle this issue is the font replacement option. Simply choose Tools -> Options then OpenOffice.org -> Fonts. You should see a dialog similar to the following:
The Open Office user can simply select which fonts to replace with which fonts on an Always or Screen only case. Though this is not always a complete solution. Amore complete solution will be provided in the final installment of OpenOffice .odt Opened Up – Part 3: Styles. I will provide an application that will indeed optimize all of the aspects of the office:document-style elements. Up next is the office:styles element.
Until next time,
-3monkeys
Popularity: 18% [?]














(1 votes, average: 9.00 out of 10)
December 3rd, 2009 at 10:44 am
Hi, just thought you’d be interested to know that I have added your blog to my Google bookmarks because of your beautiful blog layout (LOL). With that said, seriously, I believe your blog has one of the cleanest theme I’ve came across. It really makes your blog post easier to read.
August 19th, 2010 at 11:32 pm
I have used OpenOffice on a number of occasions, and it comes in handy when on a friend’s computer without an office suite. It’s great to know that it’s customizable as well!
Love your layout by the way!
December 28th, 2010 at 8:23 pm
I know this may sound incredible however it is real. And, its an Ecommerce Promoter’s Exclusive! With One Click you can submit your offer to thousand’s of network message boards, personal message boards, blogs, FFA networks and safelists. Customers that have tried this service report a noted increase in exposure and sales. Right now its just $19.95 and you also get a Bonus Contact Solo-Emailing.
January 3rd, 2011 at 4:32 pm
Hopefully people will put their ear to the ground and pay attention. This is topnotch information that could easily make up for a membership site.
January 4th, 2011 at 11:45 am
keep at it man, your almost there , thanks for the read!
January 6th, 2011 at 2:34 pm
Above everything else I appreciate making room for alternatives, even though these are not perfectly tailored on your frame of mind and action.
January 14th, 2011 at 10:02 am
Hello,
good info, thanks for that. I got one ask: can u comment my website http://www.centrumkrzesel.pl ?
Should i change something ? Ty for info about that.
January 17th, 2011 at 2:26 am
Great article about Cheap Home Phones…thanks! =)
January 19th, 2011 at 1:34 pm
Fajny blog, pewnie cz?¶ciej b?d? tu wpada?.
January 24th, 2011 at 10:32 pm
I never had any luck on hotjobs finding a job
I had to use veemin.com to find a decent paying fulltime job.
February 4th, 2011 at 2:38 pm
Good day very cool web site!! Guy .. Beautiful .. Amazing .. I’ll bookmark your site and take the feeds also…I am satisfied to seek out a lot of useful info here in the publish, we need develop extra strategies in this regard, thank you for sharing. . . . . . Executive Elite, 18a Greycoat Gardens, Greycoat Street, London, SW1P 2QA, 028 2088 0135
February 5th, 2011 at 11:26 am
I don’t usually post on blogs but had to on yours. You have a very easy to read writing style. I really enjoy posts about this topic, they give me a lot to reflect on. I don’t have time to read everything right now, I found this site when looking for something else on Yahoo, but I’ve bookmarked your homepage and will check back soon to see the latest thoughts.
February 7th, 2011 at 3:58 pm
Your website is so educational … hold up the excellent work!!?!!!?!
February 10th, 2011 at 1:27 am
Hi there, I discovered your web site by the use of Google even as searching for a related topic, your website got here up, it seems great. I have bookmarked it in my google bookmarks. – Elegant London Escorts, 65-67 Brewer Street, Floor: 2, London W1F 9UP. Phone: 020 3011 2941
March 31st, 2011 at 8:20 pm
I got what you mean , thanks for putting up.Woh I am glad to find this website through google.
April 11th, 2011 at 2:32 pm
My partner and I stumbled over here different web page and thought I might check things out. I like what I see so now i am following you. Look forward to looking at your web page again.
April 11th, 2011 at 4:03 pm
It is the best time to make some plans for the future and it is time to be happy. I have read this post and if I could I desire to suggest you few interesting things or advice. Perhaps you can write next articles referring to this article. I desire to read more things about it!
April 12th, 2011 at 10:22 pm
I’m not sure why but this blog is loading incredibly slow for me. Is anyone else having this problem or is it a problem on my end? I’ll check back later and see if the problem still exists.
November 24th, 2011 at 3:21 pm
Some times its a pain in the ass to read what blog owners wrote but this internet site is real user genial ! .
December 3rd, 2011 at 8:55 am
Hey, I recommend that the Admin set up a forum or discussion board, so that we can communicate and talk with each other! Thanks
December 17th, 2011 at 6:19 am
Sup , I am making a new site almost like wikipedia and your articles would fit the style good. Would you let me copy think article for my readers?
January 10th, 2012 at 1:00 pm
I was recommended this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You are amazing! Thanks!
January 13th, 2012 at 5:41 pm
When I initially commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any means you can take away me from that service? Thanks!
January 14th, 2012 at 11:23 pm
What superb piece of text! I have no clue how you were able to say this text..it’d take me weeks. Well worth it though, I’d assume. Have you considered selling advertising space on your blog?
January 15th, 2012 at 12:23 am
Rattling informative and fantastic anatomical structure of content , now that’s user genial (:.
January 16th, 2012 at 2:09 am
This provider took my hard earned money so i’d like to help make people today advised of it, please help us spread around this thing so they can not steal other peoples capital!!! They took all my cash (600$) and just do not respond anymore… same thing happened to a person well before but i found that too late. Now i am trying to pre warn many people so they do not get rid of their income like it has happened to others… The name of the website: legalpowder.cn.com
January 17th, 2012 at 7:50 am
Merely to follow up on the update of this issue on your blog and want to let you know how much I prized the time you took to generate this useful post. In the post, you really spoke of how to definitely handle this issue with all ease. It would be my personal pleasure to gather some more concepts from your website and come as much as offer other folks what I learned from you. Thanks for your usual great effort.
January 17th, 2012 at 4:51 pm
Thanks so much pertaining to giving my family an update on this topic on your website. Please understand that if a new post appears or in the event that any changes occur with the current post, I would want to consider reading more and understanding how to make good use of those strategies you share. Thanks for your efforts and consideration of other individuals by making this site available.
January 17th, 2012 at 4:51 pm
Purely to follow up on the up-date of this issue on your web page and wish to let you know just how much I appreciated the time you took to generate this valuable post. Inside the post, you spoke of how to seriously handle this issue with all ease. It would be my personal pleasure to collect some more thoughts from your site and come as much as offer some others what I discovered from you. Many thanks for your usual wonderful effort.
January 19th, 2012 at 1:54 am
Do you mind if I quote a few of your posts as long as I provide credit and sources back to your webpage? My website is in the very same niche as yours and my visitors would certainly benefit from a lot of the information you present here. Please let me know if this ok with you. Thanks!
January 19th, 2012 at 7:42 pm
Thank’s for your post. I’ll be back and read more! Regards
January 30th, 2012 at 6:39 am
I got what you impart, thanks for swing up. Woh I am glad to see this website finished google. Thanks For Share 3monkeys » OpenOffice .odt Opened Up – Part 3a: Styles/font-face-decls.