Apache OpenOffice (AOO) Bugzilla – Issue 2192
Embed truetype fonts in word documents.
Last modified: 2003-11-04 16:40:41 UTC
We have an interesting problem with exporting math objects in writer document to word format (93691) . Word requires a preview snapshop image of the object which it displays before the object is edited. For math objects we mostly use the starsymbol font, this font is a unicode font, the preview we generate is the standard wmf that word uses for previews. wmf's can only store 8bit characters :-(, generally this is not a big problem as we can convert to an 8 bit string for most text, but for the starsymbol font its often not possible. I believe that it might be possible in theory to use emf previews instead, emfs can store 16bit unicode strings I think and that would sort out the conversion to 8 bit text problem for starsymbol characters in general. There would still be one issue, and that is that the starsymbol font uses a lot of characters in the private area which make no sense unless you actually have the starsymbol font installed. Something that wouldn't be typical for ordinary word users. But again it is possible ( in theory, I have no idea how yet :-) ) to embed truetype fonts in word documents. So if we were able to embed the starsymbol font in our word documents that use math, then we would be able to store emf previews of our math objects that use the starsymbol font and our previews would actually look like the original object. So, do we have complete control over the starsymbol font licensing to be allowed to embed it in word documents.
This issue is re-assigned to Christian Jansen for further evaluation.
Hi Falko, This is a filter issue.
If your last sentence is a question my answer is yes ;o)
Hi Caolán, If there is no licensing problem that prevents us from embedding our StarSymbol and StarMath fonts, I would also like to see this feature within the PowerPoint filter. I think it will be really easy to implement this into the PPT filter, and if it is no problem for our other Microsoft filter, it should been considered to add this feature optionally for all our filter.
Do you already know how ppt embeds its fonts ? For word I only have one known bit "fEmbedFonts", which just says that it contains fonts or not. It'd quite a bit of work to figure it all out for .doc so I haven't been able to get around to it yet.
*** Issue 4387 has been marked as a duplicate of this issue. ***
Technote: rtf can contain truetype \fttruetype. Investigate this.
*** Issue 3839 has been marked as a duplicate of this issue. ***
*** Issue 5140 has been marked as a duplicate of this issue. ***
*** Issue 2261 has been marked as a duplicate of this issue. ***
Created attachment 1857 [details] Stage 1: Bullet mapping
Oky doky: Could those users who reported the problem of not being able to see bullets in documents exported to word .doc in word itself please look at the last attached document in word to confirm that it works on virgin copies of word on machines that have never had the {open|star}symbol font installed.
It seems to work fine. :-) However the first bullet is a little bit strange (rather a little bit distorted circle - not like the third one).
I forgot to mention that I opened it in the Word 2000.
Created attachment 1859 [details] Does it look like this...
No, the first one looks different. It looks like empty ellipse which is more tall than wide.
That's *exactly* what I didn't want to hear. Some more tweaking obviously required.
Created attachment 1865 [details] how about this one ?
I'm sorry but it's just the same :-(
Created attachment 1866 [details] another attempt...
If this last attempt still doesn't work can you tell me what clicking on word's tools->options->compatability->font substitution says ?
No :-( it still doesn't work. Here is the table: output100.doc: Andale Sans UI -> Times New Roman StarSymbol -> default (Wingdings) Thorndale -> Times New Roman output200.doc: StarSymbol -> default (Wingdings) StarSymbolArial Unicode MS -> Arial (exactly that - strange) example.doc: StarSymbol -> default (Wingdings)
Created attachment 1871 [details] isn't this fun...
This is a real "works for me" kind of thing. If the last one doesn't work could I get the version of windows you have, and the font list in your fonts dir under windows. Perhaps I misunderstand what the default installed fonts of windows/word are and what they contain. The font substition is now supposed to be starsymbol -> arial according to that compatability option. (I hope you didn't press "Convert permanantly" ?)
Two things with the latest try output.doc: No, the bullet is still empty ellipse :-( Yes, the font substitution table is: Andale Sans UI -> Times New Roman StarSymbol -> Arial Thorndale -> Times New Roman So at least something is fine ;-)
What version of windows (and of word) are we talking about here ?. I'm baffled, can you use their character map program and chose the "Arial" font and select "advanced" view. Choose a character set of "unicode" and examine the arial font to confirm that there actually is a bullet character at position 0x2022.
Windows 2000 CZ , Word 2000 CZ (but it shouldn't matter that it's czech version) I am not sure if the character in the 0x2022 is exactly the bullet Word uses as default but it is definitely a small filled circle not anything like I see in the .doc files you've attached here. There is another (bigger) filled circle at position 0x25CF. I've zoomed the view of the .doc file to max and now I see that the character is really strange - it seems to be something like 'O' character of some outline font (without black filling of stems).
I'm going to hold onto this idea as an enhancement to implement font embedding, and the interim resolution of most peoples problems should occur with font substitution as in issue 3839.
And I'm not going to implement font embedding for a while.
Created attachment 3348 [details] .doc with embedded starsymbol --> readonly in word
reopen with new developments.
cmc->ft: There's a snag with embedding our starsymbol font in word documents... If you delete starsymbol font from a windows test machine,(a reboot seems required afterwards to update this despite being removed through the control panel font dialog) and open the last attached document in word then the document is readonly because of the use of a readonly embedded font, i.e. starsymbol! This is a property of the font, I was able to check it out with a demo version of "FontLab" from http://www.fontlab.com/html/fontlab.html#downloads The starsymbol font has its embedding settings set to "only printing and previewing of the document is allowed (read-only)" which means that if the embedded font is used then the document cannot be edited :-(, so embedding this font is a waste of time. We would need the embedding information to be changed to "Editing of the document is allowed" if we are to have any chance of making this work appropiately.
FT->AMA: Wrong owner, I am not on top of MS filter project anymore. Please take over, thx.
You've solved the problem or at least found a workaround?
With issue 3839 we worked around most of these problems, and sj in the graphic team came up with a workaround for using starsymbol in wmf files, so while it is interesting that we cannot embed starsymbol without the destination document being readonly, its no longer required for us to solve the original set of problems associated with this document.
Closed.