MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / get_char_info

Method get_char_info

2dlib/font.cpp:690–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688// ----------------------------------------------------------------------------
689
690int grFont::get_char_info(int ch, int *width) {
691 gr_font_file_record *ft;
692
693 ASSERT(m_FontHandle > -1);
694
695 ft = &grFont::m_FontList[m_FontHandle].font;
696
697 if (ch < ft->min_ascii || ch > ft->max_ascii)
698 *width = 0;
699 else if (ft->flags & FT_PROPORTIONAL)
700 *width = ft->char_widths[ch - ft->min_ascii];
701 else
702 *width = ft->width;
703
704 return 0;
705}
706
707uint8_t *grFont::get_kern_info(uint8_t c1, uint8_t c2) {
708 // gr_font_file_record *ft;

Callers 3

get_text_line_widthMethod · 0.80
draw_text_line_clipMethod · 0.80
draw_text_lineMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected