freetype
[Top][All Lists]
Advanced

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

Re: [ft] Fw: [ft-devel] fitting a text


From: Lawrence D'Oliveiro
Subject: Re: [ft] Fw: [ft-devel] fitting a text
Date: Sat, 6 Jun 2015 15:45:30 +1200

folkert <address@hidden> wrote:

> I'm trying to draw text to a bitmap. It should fit the height of the
> bitmap and the width can be extended whenever required.
> Getting the width right works fine but the height is a problem: a, b,
> c fit nicely but g, q and _ fall below the bottom.

You have to add the maximum ascender and the maximum descender of
allt the glyphs to get the minimum bitmap height. For example:
<https://github.com/ldo/python_freetype_examples/blob/master/render_text>



reply via email to

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