LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2004--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2004--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 } | 141 } |
142 | 142 |
143 Box | 143 Box |
144 Pango_font::get_scaled_indexed_char_dimensions (size_t signed_idx) const | 144 Pango_font::get_scaled_indexed_char_dimensions (size_t signed_idx) const |
145 { | 145 { |
146 PangoFont *font = pango_context_load_font (context_, pango_description_); | 146 PangoFont *font = pango_context_load_font (context_, pango_description_); |
147 PangoRectangle logical_rect; | 147 PangoRectangle logical_rect; |
148 PangoRectangle ink_rect; | 148 PangoRectangle ink_rect; |
149 pango_font_get_glyph_extents (font, signed_idx, &ink_rect, &logical_rect); | 149 pango_font_get_glyph_extents (font, signed_idx, &ink_rect, &logical_rect); |
150 Box out (Interval (PANGO_LBEARING (ink_rect), | 150 Box out (Interval (PANGO_LBEARING (ink_rect), |
151 PANGO_RBEARING (ink_rect)), | 151 PANGO_RBEARING (ink_rect)), |
152 Interval (-PANGO_DESCENT (ink_rect), | 152 Interval (-PANGO_DESCENT (ink_rect), |
153 PANGO_ASCENT (ink_rect))); | 153 PANGO_ASCENT (ink_rect))); |
154 out.scale (scale_); | 154 out.scale (scale_); |
155 return out; | 155 return out; |
156 } | 156 } |
157 | 157 |
158 Box | 158 Box |
159 Pango_font::get_glyph_outline_bbox (size_t signed_idx) const | 159 Pango_font::get_glyph_outline_bbox (size_t signed_idx) const |
160 { | 160 { |
161 PangoFcFont *fcfont = PANGO_FC_FONT (pango_context_load_font (context_, pango_
description_)); | 161 PangoFcFont *fcfont = PANGO_FC_FONT (pango_context_load_font (context_, pango_
description_)); |
162 FT_Face face = pango_fc_font_lock_face (fcfont); | 162 FT_Face face = pango_fc_font_lock_face (fcfont); |
163 Box b = ly_FT_get_glyph_outline_bbox (face, signed_idx); | 163 Box b = ly_FT_get_glyph_outline_bbox (face, signed_idx); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 ps_name = initial + name; | 343 ps_name = initial + name; |
344 } | 344 } |
345 else if (ps_name_str0) | 345 else if (ps_name_str0) |
346 ps_name = ps_name_str0; | 346 ps_name = ps_name_str0; |
347 | 347 |
348 if (ps_name.length ()) | 348 if (ps_name.length ()) |
349 { | 349 { |
350 ((Pango_font *) this)->register_font_file (file_name, | 350 ((Pango_font *) this)->register_font_file (file_name, |
351 ps_name, | 351 ps_name, |
352 face_index); | 352 face_index); |
353 | |
354 pango_fc_font_unlock_face (fcfont); | |
355 | 353 |
356 SCM expr = scm_list_n (ly_symbol2scm ("glyph-string"), | 354 SCM expr = scm_list_n (ly_symbol2scm ("glyph-string"), |
357 self_scm (), | 355 self_scm (), |
358 ly_string2scm (ps_name), | 356 ly_string2scm (ps_name), |
359 scm_from_double (size), | 357 scm_from_double (size), |
360 scm_from_bool (cid_keyed), | 358 scm_from_bool (cid_keyed), |
361 ly_quote_scm (glyph_exprs), | 359 ly_quote_scm (glyph_exprs), |
362 SCM_UNDEFINED); | 360 SCM_UNDEFINED); |
363 | 361 |
364 return Stencil (b, expr); | 362 return Stencil (b, expr); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 return s; | 469 return s; |
472 } | 470 } |
473 | 471 |
474 SCM | 472 SCM |
475 Pango_font::font_file_name () const | 473 Pango_font::font_file_name () const |
476 { | 474 { |
477 return SCM_BOOL_F; | 475 return SCM_BOOL_F; |
478 } | 476 } |
479 | 477 |
480 #endif // HAVE_PANGO_FT2 | 478 #endif // HAVE_PANGO_FT2 |
LEFT | RIGHT |