texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] [RFC] no character in font information


From: Igor V. Kovalenko
Subject: [Texmacs-dev] [RFC] no character in font information
Date: Sun, 03 Nov 2002 20:25:09 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020809

Hi, Joris!

Inspired by valgrind debugging I added a simple check to
tex_font_metric_rep::tag function:

int tex_font_metric_rep::tag (QN c)
{
    if (!char_info) {
        cout << "tex_font_metric_rep::tag "
             << " char_info is NULL"
             << " (res_name=" << res_name << ")"
             << std::endl;
        return 0;
    }

    if (c < bc) {
        cout << "tex_font_metric_rep::tag "
             << " c=" << int(c)
             << " < bc=" << int(bc)
             << " (res_name=" << res_name << ")"
             << std::endl;
        return 0;
    }

    if (c > ec) {
        cout << "tex_font_metric_rep::tag "
             << " c=" << int(c)
             << " > ec=" << int(ec)
             << " (res_name=" << res_name << ")"
             << std::endl;
        return 0;
    }

    return (char_info [c-bc]>>8)&3;
}

The zero returns are there to not walk out of char_info bounds.
AFAIK similar problem exist for tex_font_metric_rep::i function.

A test run give lines in output:

tex_font_metric_rep::tag  c=254 > ec=127 (res_name=cmr8)
tex_font_metric_rep::tag  c=254 > ec=127 (res_name=cmr12)

There are many of these, and they are intermixed.

The current LANG=ru_RU.KOI8-R. I loaded a file with cyrillic (russian) 
characters.

Comments, please? I'm no expert in TeX fonts... But yes, I tried
regenerating PK files - nothing changed. I'm using tetex-1.0.7 from RedHat.

--
Regards,
Igor V. Kovalenko    mailto: iko at crec dot mipt dot ru





reply via email to

[Prev in Thread] Current Thread [Next in Thread]