Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » Using Qtf forgets control font
Re: Using Qtf forgets control font [message #17849 is a reply to message #17842] Sun, 31 August 2008 10:46 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
Sorry, "FontZoom" is "general term". The methods are

Ctrl::

	static const char *GetZoomText();
	static void SetZoomSize(Size sz, Size bsz = Size(0, 0));
	static int  HorzLayoutZoom(int cx);
	static int  VertLayoutZoom(int cy);
	static Size LayoutZoom(int cx, int cy);
	static Size LayoutZoom(Size sz);
	static void NoLayoutZoom();
	static void GetZoomRatio(Size& m, Size& d);

	static int  HZoom(int cx)                            { return HorzLayoutZoom(cx); }


The idea behind this is that there is some basic font size. All dialog layouts are designed with this basic font size in mind - and these are units shown in layout designer.

Then there is "GetZoomText" - a standard text whose size is known in basic font size (by basic font we consider here the "normal font" used for most texts in GUI).

Then, when U++ app is started, the same text is measured in host platform "normal GUI font" and this new size / "standard size" is taken as "FontZoom ratio".

This is the best solution I was able to invent... In practice, it works pretty well.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Print Preview function for RichText/RichEdit
Next Topic: Is there a way to do page of pages, i.e., Page 2 of 5 in Report?
Goto Forum:
  


Current Time: Mon Aug 04 20:10:45 CEST 2025

Total time taken to generate the page: 0.23924 seconds