Home » U++ Library support » RichText,QTF,RTF... » Need help with setting RichEdit fonts in droplist [SOLVED]
Need help with setting RichEdit fonts in droplist [SOLVED] [message #41995] |
Mon, 10 February 2014 09:53 |
slashupp
Messages: 231 Registered: July 2009
|
Experienced Member |
|
|
using upp svn6883 on debian
When RE starts the fontfaces droplist contains only serif, sans-serif and monospace.
I want to be have it filled with the fonts available on my system,
and then be able to specify a default font, say Times roman instead of sans-serif.
(I've tested with a copy of RE by changing the source I can have my
system fonts shown (using a custom Display()) but cannot set the default font to one of my choosing.)
With the standard RE is there a way in which I can achieve both these?
thx
[Updated on: Mon, 17 February 2014 09:30] Report message to a moderator
|
|
|
|
Re: Need help with setting RichEdit fonts in droplist [message #42079 is a reply to message #42033] |
Mon, 17 February 2014 09:29 |
slashupp
Messages: 231 Registered: July 2009
|
Experienced Member |
|
|
Thx mirek
filling the droplist works correctlu, thanks.
But to set the default selected font:
Quote: | the use ApplyFormatInfo to set initial font.
|
does not work.
This works:
RichText::FormatInfo FI=myRE.GetFormatInfo();
//FI.SetDefaultFont(Font(deffont,11)); <--- doesn't! (deffont was set when droplist was filled)
FI.FaceName("Times New Roman");
FI.Height(myRE.PtToDot(11)); //must use PtToDot here
myRE.ApplyFormatInfo(FI);
|
|
|
Goto Forum:
Current Time: Fri Sep 27 00:22:59 CEST 2024
Total time taken to generate the page: 0.02732 seconds
|