X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=dvi%2Fdvilib%2Fdl-vffont.cc;h=36d570f9c51935637db7b2fe46a9d4571ebcaa4f;hb=refs%2Ftags%2FEVINCE_0_1_8;hp=91109d8843f4224633804f088a3b601a72ab30e7;hpb=4296951e94a43c723e9522b588cab178eb66d144;p=evince.git diff --git a/dvi/dvilib/dl-vffont.cc b/dvi/dvilib/dl-vffont.cc index 91109d88..36d570f9 100755 --- a/dvi/dvilib/dl-vffont.cc +++ b/dvi/dvilib/dl-vffont.cc @@ -3,14 +3,39 @@ using namespace DviLib; -VfFont::VfFont (AbstractLoader &l, int at_size_arg) : - at_size (at_size_arg) +void +VfFont::fixup_fontmap (DviFontMap *fontmap) { - DviParser parser (l); - preamble = parser.parse_vf_font_preamble (); + typedef std::map::iterator It; + for (It i = fontmap->fontmap.begin(); i != fontmap->fontmap.end(); ++i) + { + (*i).second->at_size = ((*i).second->at_size / 1048576.0) * preamble->design_size; +#if 0 + (*i).second->design_size = 1048576; +#endif + } +} +VfFont::VfFont (AbstractLoader &l, + int at_size_arg) +{ + at_size = at_size_arg; + DviParser parser (l); + preamble = parser.parse_vf_font_preamble(); + VfChar *ch; - while ((ch = parser.parse_vf_char ()) != NULL) + while ((ch = parser.parse_vf_char()) != NULL) + { chars[ch->character_code] = ch; + ch->fontmap = preamble->fontmap; + } + + /* fixup fontmap + * + * FIXME: I don't think this is correct, but vftovp.web isn't + * totally clear on the issue + */ + + fixup_fontmap (preamble->fontmap); }