freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Platform independent viewer (Maybe OT?)


From: Leonard Rosenthol
Subject: Re: [Freetype] Platform independent viewer (Maybe OT?)
Date: Sun, 25 Aug 2002 19:10:51 -0400

At 7:17 PM +0200 8/25/02, Dexter wrote:
I have to write a program, with platform independent code, that outputs
loaded font to a bitmap.

        OK.  Do you mean a generic bitmap/raster image or a BMP file?


I have written this function to work under Win32 but i have no idea on how
to make it platform independent.

        What other platforms are you trying to render to?


It shouldnt be linked to anthing but os libs and freetype lib!

        So what will you do for BMP services on non-Windows?


 BITMAPINFO i;
 ZeroMemory( &i.bmiHeader, sizeof(BITMAPINFOHEADER));

 switch(iMode)
 {
 case MODE_256_256:
  i.bmiHeader.biWidth = i.bmiHeader.biHeight = 256;
  break;
 case MODE_512_512:
  i.bmiHeader.biWidth = i.bmiHeader.biHeight = 512;
  break;
 case MODE_1024_1024:
  i.bmiHeader.biWidth = i.bmiHeader.biHeight = 1024;
  break;
 }

BMP is inverted from everyting else on the planet in terms of raster images. You should use a negative height value. See the MSDN technical reference stuff for details.


Leonard
--
---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:address@hidden>
                                             <http://www.lazerware.com>



reply via email to

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