BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RichEdit Font

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using
View previous topic :: View next topic  
Author Message
DP
Guest





PostPosted: Wed Oct 29, 2003 4:49 pm    Post subject: RichEdit Font Reply with quote



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





PostPosted: Fri Oct 31, 2003 8:41 pm    Post subject: Re: RichEdit Font Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.