- scm_gc_mark (coding_vector_);
- scm_gc_mark (coding_description_);
- scm_gc_mark (coding_table_);
- scm_gc_mark (coding_mapping_);
-}
-
-/* TODO: put this klutchness behind ly:option switch. */
-Box
-Modified_font_metric::tex_kludge (String text) const
-{
- Interval ydims;
- Real w = 0;
- for (int i = 0; i < text.length (); i++)
- {
- switch (text[i])
- {
- case '\\':
- /* Accent marks use width of base letter */
- if (i +1 < text.length ())
- {
- if (text[i+1]=='\'' || text[i+1]=='`' || text[i+1]=='"'
- || text[i+1]=='^')
- {
- i++;
- break;
- }
- /* For string width \\ is a \ and \_ is a _. */
- if (text[i+1]=='\\' || text[i+1]=='_')
- break;
- }
-
- for (i++; (i < text.length ()) && !isspace (text[i])
- && text[i]!='{' && text[i]!='}'; i++)
- ;
-
- /* Compensate for the auto-increment in the outer loop. */
- i--;
- break;
-
- case '{': // Skip '{' and '}'
- case '}':
- break;
-
- default:
- Box b = get_ascii_char ((unsigned char)text[i]);
-
- /* Use the width of 'x' for unknown characters */
- if (b[X_AXIS].length () == 0)
- b = get_ascii_char ((unsigned char)'x');
-
- w += b[X_AXIS].length ();
- ydims.unite (b[Y_AXIS]);
- break;
- }
- }
-
- if (ydims.is_empty ())
- ydims = Interval (0, 0);
-
- return Box (Interval (0, w), ydims);