[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>
- [ft] Fw: [ft-devel] fitting a text, Werner LEMBERG, 2015/06/05
- Re: [ft] Fw: [ft-devel] fitting a text,
Lawrence D'Oliveiro <=
- Re: [ft] Fw: [ft-devel] fitting a text, folkert, 2015/06/07
- Re: [ft] Fw: [ft-devel] fitting a text, Lawrence D'Oliveiro, 2015/06/07
- Re: [ft] Fw: [ft-devel] fitting a text, folkert, 2015/06/11
- Re: [ft] Fw: [ft-devel] fitting a text, Lawrence D'Oliveiro, 2015/06/11
- Re: [ft] Fw: [ft-devel] fitting a text, folkert, 2015/06/12
- Re: [ft] Fw: [ft-devel] fitting a text, Lawrence D'Oliveiro, 2015/06/12
- Re: [ft] Fw: [ft-devel] fitting a text, folkert, 2015/06/12
- Re: [ft] Fw: [ft-devel] fitting a text, Lawrence D'Oliveiro, 2015/06/12
- Re: [ft] Fw: [ft-devel] fitting a text, folkert, 2015/06/12