freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] ShowImage


From: samaram s
Subject: Re: [ft] ShowImage
Date: Tue, 26 Jan 2010 14:48:13 -0500

address@hidden:~/Downloads# ./cglyph2bitmap ACME.ttf A
Family name of the font is --- A.C.M.E. Explosive
Style name of the font is --- Bold
Text A
Pixel Mode 2
.......**.
......***.
.....****.
....**.**.
...**..**.
...******.
..*******.
..***..**.
.**....**.
.**....**.
..........

When i was trying with the API's i could able to get the bitmap of the glyph "A",But why only if value >128 trace outs the character glyph that i gave?Does it mean the Glyph data is always greater than 128?

Can you please explain me?

Thank You.


On Tue, Jan 26, 2010 at 11:09 AM, Werner LEMBERG <address@hidden> wrote:

> In ShowImage ,we are comparing image[i][j] <128 Can any one please
> explain me what is the logic behind that?
>
> if( image[i][j] < 128)
>         putchar('.');
>      else
>         putchar('*');

I've already explained this to you: The bitmap buffer contains gray
shades (values 0-255); for the TTY display I reduce them to two
values: A dot for the range 0-127 and an asterisk for 128-255.

PLEASE study the demo source code together with the tutorials.  And
don't rush.


   Werner


reply via email to

[Prev in Thread] Current Thread [Next in Thread]