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


Previous by date: 20 Dec 2013 08:43:50 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Wayne Johnson
Next by date: 20 Dec 2013 08:43:50 -0000 Re: nanox patch 320x240 to 640x480 with config 320x240, Greg Haerr
Previous in thread: 20 Dec 2013 08:43:50 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Wayne Johnson
Next in thread: 20 Dec 2013 08:43:50 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Greg Haerr

Subject: AW: [nanogui] Nano-X: Problem with Drawing big ttf fonts to pixmaps
From: Andreas Schwinghammer ####@####.####
Date: 20 Dec 2013 08:43:50 -0000
Message-Id: <B6313A8200F7C24485539C7E4EC57C3390ED@Exchange.Newlift.local>

Hi Wayne,

I tried your issue with GdGetTextSize() and get a result.
I compared the widths I get from GrGetTextSize() and GrGetFontInfo() => different widths.

For my problem: I use both functions in combinition to get the info I need.
Many thanks.

But only for interest: Why is it so?

merry christmas and a happy new year 2014

Andreas


-----Ursprüngliche Nachricht-----
Von: Wayne Johnson ####@####.#### 
Gesendet: Donnerstag, 19. Dezember 2013 21:13
An: Wayne Johnson; Andreas Schwinghammer; ####@####.####
Betreff: RE: [nanogui] Nano-X: Problem with Drawing big ttf fonts to pixmaps

It looks like you are using the nano-x wrapper around the graphics engine.
We don't use that portion of the code so I don't have it in my source tree
at the moment. I would look for this function in the nano-x wrapper code
to see if it used. From there you can figure out how it is exposed.

Wayne

> -----Original Message-----
> From: Wayne Johnson ####@####.####
> Sent: Thursday, December 19, 2013 12:10 PM
> To: 'Andreas Schwinghammer'; ####@####.####
> Subject: RE: [nanogui] Nano-X: Problem with Drawing big ttf fonts to
> pixmaps
>
> Will GdGetTextSize() do what you need? You pass in a string and it
> should give you back the width and the height for a specific font.
>
> Wayne
>
> > -----Original Message-----
> > From: Andreas Schwinghammer ####@####.####
> > Sent: Thursday, December 19, 2013 4:18 AM
> > To: ####@####.####
> > Subject: [nanogui] Nano-X: Problem with Drawing big ttf fonts to
> > pixmaps
> >
> > 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: 20 Dec 2013 08:43:50 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Wayne Johnson
Next by date: 20 Dec 2013 08:43:50 -0000 Re: nanox patch 320x240 to 640x480 with config 320x240, Greg Haerr
Previous in thread: 20 Dec 2013 08:43:50 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Wayne Johnson
Next in thread: 20 Dec 2013 08:43:50 -0000 Re: Nano-X: Problem with Drawing big ttf fonts to pixmaps, Greg Haerr


Powered by ezmlm-browse 0.20.