OLD | NEW |
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--2020 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2004--2020 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 scm_hashq_set_x (lily_index_to_bbox_table_, | 344 scm_hashq_set_x (lily_index_to_bbox_table_, |
345 scm_from_unsigned_integer (signed_idx), | 345 scm_from_unsigned_integer (signed_idx), |
346 b.smobbed_copy ()); | 346 b.smobbed_copy ()); |
347 return b; | 347 return b; |
348 } | 348 } |
349 } | 349 } |
350 | 350 |
351 Box b = get_unscaled_indexed_char_dimensions (signed_idx); | 351 Box b = get_unscaled_indexed_char_dimensions (signed_idx); |
352 | 352 |
353 b.scale (design_size () / Real (face_->units_per_EM)); | 353 b.scale (design_size () / static_cast<Real> (face_->units_per_EM)); |
354 return b; | 354 return b; |
355 } | 355 } |
356 | 356 |
357 Real | 357 Real |
358 Open_type_font::get_units_per_EM () const | 358 Open_type_font::get_units_per_EM () const |
359 { | 359 { |
360 return face_->units_per_EM; | 360 return face_->units_per_EM; |
361 } | 361 } |
362 | 362 |
363 size_t | 363 size_t |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 SCM entry = scm_hashq_ref (lily_global_table_, | 413 SCM entry = scm_hashq_ref (lily_global_table_, |
414 ly_symbol2scm ("design_size"), | 414 ly_symbol2scm ("design_size"), |
415 | 415 |
416 /* | 416 /* |
417 Hmm. Design size is arbitrary for | 417 Hmm. Design size is arbitrary for |
418 non-design-size fonts. I vote for 1 - | 418 non-design-size fonts. I vote for 1 - |
419 which will trip errors more | 419 which will trip errors more |
420 quickly. --hwn. | 420 quickly. --hwn. |
421 */ | 421 */ |
422 scm_from_unsigned_integer (1)); | 422 scm_from_unsigned_integer (1)); |
423 return scm_to_double (entry) * Real (point_constant); | 423 return scm_to_double (entry) * static_cast<Real> (point_constant); |
424 } | 424 } |
425 | 425 |
426 SCM | 426 SCM |
427 Open_type_font::sub_fonts () const | 427 Open_type_font::sub_fonts () const |
428 { | 428 { |
429 return lily_subfonts_; | 429 return lily_subfonts_; |
430 } | 430 } |
431 | 431 |
432 SCM | 432 SCM |
433 Open_type_font::get_char_table () const | 433 Open_type_font::get_char_table () const |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 if (code) | 467 if (code) |
468 warning (_f ("FT_Get_Glyph_Name () error: %s", | 468 warning (_f ("FT_Get_Glyph_Name () error: %s", |
469 freetype_error_string (code).c_str ())); | 469 freetype_error_string (code).c_str ())); |
470 | 470 |
471 *tail = scm_cons (scm_from_ascii_string (name), SCM_EOL); | 471 *tail = scm_cons (scm_from_ascii_string (name), SCM_EOL); |
472 tail = SCM_CDRLOC (*tail); | 472 tail = SCM_CDRLOC (*tail); |
473 } | 473 } |
474 | 474 |
475 return retval; | 475 return retval; |
476 } | 476 } |
OLD | NEW |