Bitmap-font support

Dear Haiku-Team,

please make sure, Haiku can handle bitmap-fonts as well as anti-aliased outline fonts. At small sizes bitmaps are far superior compared to fuzzy a-a’ed fonts.

Please make sure, font-preferences of haiku work system-wide and consistent.

I am writing this, bc. (example) os-x is focused on anti-aliased fonts, has no decent font-options, font-hacks cause an inconsistent appearance plus font-rendering is only mediocre. All this cons are inacceptable for an “next-gen”-OS, please do it better - i’m sure it’s possible. Don’t cripple the OS like Apple does all the time.

Please make all GUI-Fx flexible in options, i mean user can control fx and DISABLE all the eyecandy.

Besides, i can offer you a bunch of handcrafted bitmap-fonts, extremely useful for small stuff, handhelds, people who are used to maximum efficency. Don’t hesitate to contact me.

Rest assured, my friend, about your concerns. If I remember right, FreeType2 does do bitmap fonts, and the eye candy is pretty much my department, and for R1, there won’t be any huge CPU-sucking eyecandy.

If you’d like to submit some fonts, you can e-mail them to me at I can’t say that I’ll check them into the tree because I’m trying to keep as few as possible in the tree, but I’d make them available for download in the least. :slight_smile:

I was thinking yesterday about font-rendering on modern OSes. I found myself the need for a TRUE 3D font render technology, but I cannot cope with it alone. After imagining how to do the system call for such a render, I discovered we needed a function call like this:
writetext(charfname,wcharmessage,double x,double y,double z,double alpha, double beta,double gamma,int kern)

fname is the font name, while message is the actual text to be rendered. alpha, beta, gamma will be, respectively, the angles along x, y and z axis. The render will be done in the plane that covers those angles. The kern is how many additional units will be left between letters. It’s measured along the render plane.

After determining that, I though on adding the way to add an user-defined routine that has to be thread-safe, but not neccesarily reentrant, that captures each character before outputting it to the screen and alteres its position, plane and kerning, so nice fonts effects can be achieved. The system will call this routine BEFORE rendering each character. It’s code will be something like:

struct fontreder {
   double dx, double dy, double dz,
   double dalpha,double dbeta,double dgamma,
   int dkern
int pretextrender(int thread_id,struct fontrender *frp){
  /* Here the routine receives in frp the actual font rendering values and it has to return the DELTAS (i.e., relative increments/decrements) for those parameters in the same structure. The system will add those deltas to the actual values and then render the character. The routine will be called for each character on each thread. The thread-id parameter should be used to differentiate each thread and string */
 return 0; /* returns 0 if all goes right, 1 in case of any error. In this case, the values returned will be ignored by the OS so font render won't be affected */

I know this idea can be used on normal 2D font rendering and extended to 3D in RC2. Just my two eurocents :wink:

…but what fontformat(s) will the fonts in Haiku R1 (and R2) have?
Type1 / Type3 / OpenType / TrueType or what? AFAIK FreeType2 is purely a fontengine :?

FT2 is a font engine, but I’m not sure if the way I mean it is the same way that you mean it. It will handle OpenType fonts, but not the layout tables. TrueType and Type 1 fonts are the main ones that it handles, but it does a bunch of other ones, too, like BDF and FON fonts. HTH.

it doesn’t matter if it’s the same we mean or not. As far as I understand FT2 is a lowlevel-api-thingy and has no native font-format. But it supports a lot of fontformats (Type1 is my favourite). And that’s enough for me, and all I need to know. :stuck_out_tongue:

. o O ( Mr.Jones goes looking for an app to work further on his “Navarro-Bau”-font he created 8 years ago, during his ½ year at the graphical line at Technical College in Aarhus :lol: )