nanogui: Nano-X: Problem with Drawing big ttf fonts to pixmaps


Previous by date: 19 Dec 2013 12:17:55 -0000 USB Touchscreen support?, Evert van Rossum
Next by date: 19 Dec 2013 12:17:55 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Wayne Johnson
Previous in thread:
Next in thread: 19 Dec 2013 12:17:55 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Wayne Johnson

Subject: Nano-X: Problem with Drawing big ttf fonts to pixmaps
From: Andreas Schwinghammer ####@####.####
Date: 19 Dec 2013 12:17:55 -0000
Message-Id: <B6313A8200F7C24485539C7E4EC57C339084@Exchange.Newlift.local>

Hi all,

I have a problem with drawing characters to pixmap.

I want to draw a character to a pixmap. To get the dimensions for this pixmap I use the width of the character.
After I create the Font using GrCreateFont() I use GrGetFontInfo()-Function for getting the character information.
The drawing itself works. I only get the wrong character widths => so I have the wrong pixmap width.

My problem, if I want a font with a height > 255pts, I get some characters with a width > 255pts.
In MWFONTINFO structure there is "widths[256]" defined as MWUCHAR (unsigned char).
But I think I need unsigned int for my problem

My issue for getting the right width is to change this to another data typ (f.e. unsigned int).
I tried this, but it ran to an error

"nxclient xxxxxxx: Wrong packet type 40 (expected 17)" (in client.c CheckBlockType(short packettype))

What I have to do to get the right font widths for my characters?

Many thanks

Andreas

Previous by date: 19 Dec 2013 12:17:55 -0000 USB Touchscreen support?, Evert van Rossum
Next by date: 19 Dec 2013 12:17:55 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Wayne Johnson
Previous in thread:
Next in thread: 19 Dec 2013 12:17:55 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Wayne Johnson


Powered by ezmlm-browse 0.20.