View Single Post
  #14   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default First line in rtf file and font

Hello Hans and Bob,

Sorry it took me so long - not Bob's fault! Nor am I quite the whizz with
RTF that you might have hoped :-) Just a few initial thoughts...

Point one is that the font table starting \fonttbl simply assigns font
numbers to a number of fonts defined using certain characteristics. In the
remainder of the RTF document, the font defined as \deff17 will be
referenced as \f17 and so on. But there is nothing magical about "17"
itself, and the same font could be referenced by a different \deff number in
different documents. Word does set up a number of fonts in the \fonttbl by
default, and in practice they may well be invariant between different
instances of Word, but if you open a document, change it, and save it, there
is no reason why, in theory, Word might not completely reorganise the font
table.

So what does \deff17 in your

Additional Text_4_Sent by me.rtf

actually say?

Second, when a Windows program such as Word tries to use a font in Windows
using the "Windows GDI" (Graphics Device Interface) it selects a font based
on a number of criteria, and interestingly enough, the "Facename" (Arial,
Times New Roman) etc. is, or at least was, not the first in the list. This
dates back to the time before TrueType etc. when fonts were typically tied
to a very small pre-Unicode character set. I believe it searches using the
following sequence:
Character set
Pitch
Family (e.g. Decorative Modern, Roman, Script, Swiss)
Facename

I also see that in 3 out of the 4 files "sent by you" you have
{\rtf1\ansi\ansicpg1252\uc1
rather than
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1

\adeflang is AFAIK an RTF 1.9 (Word 2007) keyword that specifies the
"Default language ID for South Asian/Middle Eastern text in Word. The
default languages are determined by the current primary editing language and
the enabled editing languages (can be changed via Microsoft Office Language
Settings applet)." So I would guess that this keyword is only added if the
user is using Word 2007 or perhaps the compatibility pack. It could be that
you are using Word 2003 or saving as Word 2003 compatible format.

1025 actually specifies "Arabic (Saudi Arabia)" I think. However, I do not
know whether this setting will come into play unless text is marked
explicitly as being in a South Asian/Middle Eastern language, and off the
top of my head I can't tell you how that would be done in RTF. I think this
is more to do with the /human language/ being used than the script. \deflang
defines something similar for all text in the document marked as \plain: eg.
deflang1033 is English (U.S.), and \deflangfe does a similar job for East
Asian text - e.g. \deflangfe2052 is Chinese (PRC). I suppose it could be
significant that one of the files sent to you has \deflangfe2052 and others
have \deflangfe1033.


--
Peter Jamieson
http://tips.pjmsn.me.uk

"Hans L" wrote in message
...
Well, Bob, I hope we are on to something. I'll hold off a little to give
Peter time to look at this post (I really hope he will have the time)
before
I start trying to do anything to alleviate this problem.

Thanks for your help so far!

Hans L