[Bf-committers] Bitmap Fonts for the Text Editor (how to)

Dalai Felinto dfelinto at gmail.com
Thu Jul 24 08:28:53 CEST 2008


Hi.

Quick question: How to create the font files in .cpp that Blender uses ???

I'm trying to implement/enable more options of built-in Fonts for the
Blender Text Editor.
The main reason is that since I've been coding in Python in a big screen, my
eyes are getting tired :(

I need a way to generate .cpp font files like the ones that can be found in
/blender/intern/bmfont/intern/.
I found the Screen font (bfont.ttf) in the release folder, and I converted
it to bitmap using http://www.ash.webstranka.info/?p=42 and
http://download.blender.org/documentation/oldsite/oldsite.blender3d.org/44_Blender%20tutorial%20Building%20bitmap%20fonts.html.
But I'm not sure if this bitmap font format (suitable for BGE) is the same
kind of bitmap Blender internally uses.

Anyways, using Datatoc I just got a .c file with the bitmap. But according
to BMF_BitmapFont.cpp and BMF_FontData.h I also need a BMF_FontData (e.g.
BMF_font_scr20) - it is a kind of mapping of the characters in the bitmap.

So how can I convert my bitmap or ttf font file in a complete Blender .cpp
font files ???
If someone could help me I will appreciate a lot :) - I didn't find this in
the internet ...

Thanks for you time,
Dalai Felinto

http://blenderecia.orgfree.com
skype: dfelinto
msn: dfelinto at yahoo.com



PS.:
And a small bug report:
in the readfile.c in the line ... instead of:
"
if(st->font_id>1){
   st->font_id=0;
   st->lheight=13;
"
is should be "st->lheight=12;" as the default font has 12 of line height ...
unless the idea is to show that the file was saved in a different Blender
version.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-committers/attachments/20080723/18db3855/attachment.htm 


More information about the Bf-committers mailing list