 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
DP Guest
|
Posted: Wed Oct 29, 2003 4:49 pm Post subject: RichEdit Font |
|
|
Hi,
How do I set a substitute font for an RTF file, if one of the Fonts used
in RTF file is not available on the machine.
for example if I have installed MyHandwriting.ttf on my machine and create
an RTF document. Now I put this RTF file on my another machine which do not
have this font installed. Currently it seems to be using some Windows
Default Font, but what if I want to display that text using 'Arial' and
underline feature.
DP
|
|
| Back to top |
|
 |
Peter Below (TeamB) Guest
|
Posted: Fri Oct 31, 2003 8:41 pm Post subject: Re: RichEdit Font |
|
|
In article <Xns942382C7CF8EFramneekdevindercomca (AT) 207 (DOT) 105.83.66>, Dp wrote:
| Quote: | How do I set a substitute font for an RTF file, if one of the Fonts used
in RTF file is not available on the machine.
for example if I have installed MyHandwriting.ttf on my machine and create
an RTF document. Now I put this RTF file on my another machine which do not
have this font installed. Currently it seems to be using some Windows
Default Font, but what if I want to display that text using 'Arial' and
underline feature.
|
Usually you are at the mercy of the Windows font engine in this case. If a
font requested does not exist on the target system it will try to find a "best
match" for the request among the installed fonts. What it considers a match
is one of the Big MS Mysteries, though.
What you could do is pre-process the RTF file. RTF is plain text with tags,
and one of the tags you find near the start of every RTF file is fonttbl, and
that is where you would substitute one font for another. Just create a simple
RTF file with some text in your special font and its replacement in WordPad
and look at it in Notepad or the Delphi IDE editor to see how this table looks
like. You cannot use this to replace a font A with a combination of font B and
a character format like underline, though.
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|