X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fafm.hh;h=a0dfa15f429063fe9df88cb867fde1e084d2d5d0;hb=b8ef428503e626c3a5a7adc65282baf5e7dda205;hp=263deb8b62229ccd1d797642e59a46f87171405e;hpb=339ea28cd7e4f8a1c1ca7c1d4dfe803a3f4c03e6;p=lilypond.git diff --git a/lily/include/afm.hh b/lily/include/afm.hh index 263deb8b62..a0dfa15f42 100644 --- a/lily/include/afm.hh +++ b/lily/include/afm.hh @@ -1,9 +1,10 @@ + /* afm.hh -- declare Adobe_font_metric source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ @@ -15,52 +16,26 @@ #include "array.hh" #include "dictionary.hh" #include "font-metric.hh" - -struct Adobe_font_char_metric : Character_metric { - int C_; - Real WX_; - String N_; - Box B_; - int size_; - Box &bbox(); - String &name(); - Real &width(); - int &code (); - - String str () const; - Adobe_font_char_metric (); - Box dimensions () const; -}; +#include "parse-afm.hh" struct Adobe_font_metric : Font_metric { - String FontName_; - String FullName_; - String FamilyName_; - String Weight_; - Real ItalicAngle_; - bool IsFixedPitch_; - Box FontBBox_; - Real UnderlinePosition_; - Real UnderlineThickness_; - String Version_; - String Notice_; - String EncodingScheme_; - Array char_metrics_; + AFM_Font_info * font_inf_; + Array ascii_to_metric_idx_; Dictionary name_to_metric_dict_; - - Adobe_font_char_metric const &find_char (String name, bool warn=true) const; - Adobe_font_char_metric const &find_ascii (int ascii,bool warn) const; - String str () const; - Adobe_font_metric (); - void read_char_metrics (Data_file &input, int size); - - Character_metric const *get_char (int, bool) const; -}; -Adobe_font_metric read_afm_file (String fn); + Box get_char (int, bool) const; + AFM_CharMetricInfo const *find_char_metric (String name, bool warn=true) const; + AFM_CharMetricInfo const *find_ascii_metric (int, bool warn=true) const; + String str () const; + Adobe_font_metric (AFM_Font_info*); + ~Adobe_font_metric (); +}; +Adobe_font_metric * read_afm_file (String fn); +Box afm_bbox_to_box (AFM_BBox bb); + #endif /* AFM_HH */