Code Monkey home page Code Monkey logo

bdf2c's Introduction

@file README		@brief	BDF Font to C source convertor readme

Copyright (c) 2009, 2010 by Lutz Sammer.  All Rights Reserved.

Contributor(s):

License: AGPLv3

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

$Id$

My version of BDF fonts convertor to C includes, which can be used to
embed fonts into the executable.

Usage:
	./bdf2c -c

	Print #defines for font files to stdout.

	./bdf2c -C font.h

	Create font.h, which contains #defines for fonts.

	./bdf2c -b < font.bdf > font.c

	Create font.c which contains the converted bdf font.

The C file contains:

	Bitmap data for the characters.
	Character width table for proportional font
	Character codes table for utf-8 font

TODO:
	Proportional fonts (f.e. generated from ttf2bdf) aren't yet supported.
	Example how to use the created font file.

bdf2c's People

Contributors

johns-q avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bdf2c's Issues

Glyphs not converting correctly

Hi, Thanks for maintaining bdf2c.

When testing bdf2c from git-master, not all glyphs convert correctly. For example the '!' character in BDF format is:

STARTCHAR 033
ENCODING 33
SWIDTH 288 0
DWIDTH 4 0
BBX 1 5 2 0
BITMAP
80
80
80
00
80
ENDCHAR

bdf2c converts this to:

// 33 $21 '033'
// width 4, bbx 2, bby 0, bbw 1, bbh 5
X___,
X___,
,
X
,
XXX
,

The characters h, i, j, k, l, also have problems:

// 104 $68 '104'
// width 4, bbx 1, bby 0, bbw 3, bbh 5
X_____,
XX____,
X_X___,
X_X___,
X_____,
// 105 $69 '105'
// width 4, bbx 2, bby 0, bbw 1, bbh 5
,
X
,
X
,
X
_,
X_____,
// 106 $6a '106'
// width 4, bbx 1, bby -1, bbw 2, bbh 6
,
X
,
X
,
X
_,
XX______,
// 107 $6b '107'
// width 4, bbx 1, bby 0, bbw 3, bbh 5
X_____,
X_X___,
XX____,
X_X___,
XX______,
// 108 $6c '108'
// width 4, bbx 2, bby 0, bbw 1, bbh 5
X___,
X___,
X___,
X___,
XX______,

The program is invoked as follows:

$ ./bdf2c -n app775 -b < app775.bdf

The version of bdf2c from sourceforge manages better but still has trouble with the char 'j'.

The font file app775.bdf is attached (zipped: app775.zip). The BDF font was generated by Fony http://hukka.ncn.fi/index.php?fony originally app775.fon taken from a Windows machine.

Any fix or suggested workaround would be really appreciated. Thanks.

Valuable Feedback

(I haven't figured out yet how to send a message, which is not an issue, on GitHub, so...)

"Only idiots print usage on stderr"

:)))))))))) Thanks for taking on the mission!

(OK, now you have a nice, easy-to-close "WONTFIX" issue.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.