Home » U++ Library support » Look and Chameleon Technology » Font drawing in linux
Font drawing in linux [message #33014] |
Thu, 30 June 2011 13:10  |
Zbych
Messages: 327 Registered: July 2009
|
Senior Member |
|
|
Hi,
I am writing an application that shows information on small (44x16 pixel) LED display. The problem is that ttf fonts in NOGTK version of UPP look worse that in GTK. I thought that font rendering is the same in GTK and NOGTK version. Any ideas how to correct font drawing?
Test code:
#include <CtrlLib/CtrlLib.h>
#include <Draw/Draw.h>
using namespace Upp;
GUI_APP_MAIN
{
Size sz(55,24);
Font fnt(Font::FindFaceNameIndex("Impact"), 14);
fnt.NonAntiAliased();
ImageDraw id(sz);
id.DrawRect(0, 0, sz.cx, sz.cy, Black());
id.DrawText(0, -4, "PO LINE1", fnt, White());
id.DrawText(0, 8, "PO LINE2", fnt, White());
PNGEncoder png;
png.SaveFile("FontTest.png", Image(id));
}
|
|
|
Goto Forum:
Current Time: Mon Apr 28 12:06:32 CEST 2025
Total time taken to generate the page: 0.00816 seconds
|