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 » Draw, Display, Images, Bitmaps, Icons » Strange issue with text in Painter
Re: Strange issue with text in Painter [message #50903 is a reply to message #50902] Mon, 14 January 2019 10:13 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 12281
Registered: November 2005
Ultimate Member
Tom1 wrote on Mon, 14 January 2019 09:58
Hi Mirek,

OK, here's the situation. Using PROTECT or not does not have any effect on this issue. Neither does the compiler; MSBT17 and MSBT17x64 both work the same.

After starting to comment out the lines from the bottom of the sequence, PaintCharacter() proved to be the line required for correct operation. Commenting it out it brought the problem back:
#if 1
		GlyphPainter chp;
		chp.move = chp.pos = Null;
		chp.tolerance = tolerance;
		PaintCharacter(chp, Pointf(0, 0), ch, fnt); // <<-- Required for correct rendering
//		DDUMP(chp.glyph);
//		ASSERT(ValueTo< Vector<float> >(v) == chp.glyph);
#endif


Any suggestions, how I should proceed?

Best regards,

Tom


Try this:

#ifdef 1
		DLOG("==== ApproximateChar " << ch << " " << (char)ch << " " << fnt << ", tolerance: " << tolerance);
		DDUMP(ValueTo< Vector<float> >(v));
		GlyphPainter chp;
		chp.move = chp.pos = Null;
		chp.tolerance = tolerance;
		extern HFONT GetWin32Font(Font fnt, int angle);
		GetWin32Font(fnt, 0);
//		PaintCharacter(chp, Pointf(0, 0), ch, fnt);
//		DDUMP(chp.glyph);
//		ASSERT(ValueTo< Vector<float> >(v) == chp.glyph);
#endif


GetWin32Font is called by PaintCharacter and has some caching inside too, maybe that is the one that is causing the trouble. Of course, if calling it fixes the problem, try to comment and uncomment...

[Updated on: Mon, 14 January 2019 10:13]

Report message to a moderator

 
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
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
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
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
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: MT + Subpixel appear incompatible in Painter
Next Topic: Painter: Excessive memory usage in PainterExamples moving window to edges of screen.
Goto Forum:
  


Current Time: Wed Apr 01 01:10:09 CEST 2020

Total time taken to generate the page: 0.03273 seconds