libdrawtext

diff src/font.c @ 13:365eba4dccec

added dtx_line_height query
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 25 Aug 2012 18:27:54 +0300
parents 10cfb642d0b8
children b6ed6e9b4092
line diff
     1.1 --- a/src/font.c	Sat Aug 25 17:50:17 2012 +0300
     1.2 +++ b/src/font.c	Sat Aug 25 18:27:54 2012 +0300
     1.3 @@ -477,6 +477,13 @@
     1.4  	dtx_font_sz = sz;
     1.5  }
     1.6  
     1.7 +float dtx_line_height(void)
     1.8 +{
     1.9 +	struct dtx_glyphmap *gmap = dtx_get_font_glyphmap(dtx_font, dtx_font_sz, '\n');
    1.10 +
    1.11 +	return gmap->line_advance;
    1.12 +}
    1.13 +
    1.14  void dtx_glyph_box(int code, struct dtx_box *box)
    1.15  {
    1.16  	int cidx;