(1 << 20)
static const Real fix_to_real (Fix f);
-Tex_font_metric_reader::Tex_font_metric_reader (std::string name)
+Tex_font_metric_reader::Tex_font_metric_reader (string name)
: input_ (name)
{
- for (int i = 0; i < TFM_SIZE; i++)
- ascii_to_metric_idx_.push_back (-1);
+ for (vsize i = 0; i < TFM_SIZE; i++)
+ ascii_to_metric_idx_.push_back (VPOS);
read_header ();
read_params ();
return get_U32_fix () * info_.design_size;
}
-std::string
+string
Tex_font_metric_reader::get_bcpl_string ()
{
- U8 length_u8 = input_.get_U8 ();
- std::string str = input_.get_string (length_u8);
+ string str;
+
+#if 0 // FIXME.
+ U8 length_u8 = input_.get_U8 ();
+ string str = input_.get_string (length_u8);
+#endif
return str;
}
//brrr
/* Move to the beginning of the parameter table in the file. */
- input_.seek_str0 (-4 * header_.param_word_count);
+#if 0
+ // FIXME.
+ input_.seek_str0 (-4 * header_.param_word_count);
+#endif
+
/* It's unlikely but possible that this TFM file has more fontdimens
than we can deal with. */
if (header_.param_word_count > TFM_MAX_FONTDIMENS)
if (code < info_.first_charcode || code > info_.last_charcode)
return tfm_char;
+#if 0 // FIXME.
//brr
/* Move to the appropriate place in the `char_info' array. */
input_.seek_str0 (header_.char_info_pos + (code - info_.first_charcode) * 4);
-
+#endif
+
/* Read the character. */
tfm_char = read_char ();
Tex_font_char_metric tfm_char;
+ // FIXME.
#define GET_CHAR_DIMEN(d) \
if (d##_index != 0) \
{ \
- input_.seek_str0 (header_.d##_pos + d##_index * 4); \
+ /* input_.seek_str0 (header_.d##_pos + d##_index * 4);*/ \
tfm_char.d##_fix_ = input_.get_U32 (); \
tfm_char.d##_ = fix_to_real (tfm_char.d##_fix_) \
* info_.design_size; \
if (tag == 1)
{
+#if 0 // FIXME.
input_.seek_str0 (header_.lig_kern_pos + remainder * 4);
+#endif
read_lig_kern_program (&tfm_char.ligatures_, &tfm_char.kerns_);
}
#define KERN_FLAG 128
void
-Tex_font_metric_reader::read_lig_kern_program (std::vector<Tfm_ligature> *ligatures, std::vector<Tfm_kern> *kerns)
+Tex_font_metric_reader::read_lig_kern_program (vector<Tfm_ligature> *ligatures, vector<Tfm_kern> *kerns)
{
bool end_b;
Tfm_kern kern_element;
kern_element.character = next_char;
+#if 0
char const *old_pos = input_.pos_str0 ();
input_.seek_str0 (header_.kern_pos + remainder * 4);
+#endif
+
kern_element.kern = get_U32_fix_scaled ();
- input_.set_pos (old_pos);
+
+ // FIXME
+ /// input_.set_pos (old_pos);
kerns->push_back (kern_element);
}