46 #define COLOUR_STACK_SIZE 18 49 #define TRANSPARENT_COLOUR OFFSET_TRANS 51 #define TRANSPARENT_COLOUR 0 55 #define U_CTRL_NULL 0x00 79 #define U_CTRL_FS 0x1C 80 #define U_CTRL_GS 0x1D 81 #define U_CTRL_RS 0x1E 82 #define U_CTRL_US 0x1F 85 #define UNICODE_SPACE (' ') 86 #define UNICODE_TAB ('\t') 87 #define UNICODE_LF (0x0a) 88 #define UNICODE_CR (0x0d) 89 #define UNICODE_ESC (0x1b) 90 #define UNICODE_HARD_SPACE (0xa0) 91 #define UNICODE_FIGURE_SPACE (0x2007) 92 #define UNICODE_APOSTROPHE_N (0x0149) 93 #define UNICODE_HYPER_ANCHOR_START (0x41) 94 #define UNICODE_HYPER_ANCHOR_END (0x61) 95 #define UNICODE_TEXT_COLOUR_START (0x43) 96 #define UNICODE_TEXT_COLOUR_END (0x63) 97 #define UNICODE_HYPER_ATTRIB_START (0x44) 98 #define UNICODE_HYPER_ATTRIB_END (0x64) 103 #define GLYPH_NDX(x) (x - 30) 106 #define MAX_NUM_LINES 32 107 #define MAX_NUM_CHARS 64 109 #define PNTS_LS_LEN(tls) ((tls + 255) >> 8) 110 #define MTRC_POSN(mll, tls, mr, fsz) mll + (PNTS_LS_LEN(tls) * mr) / fsz 114 #define S_METRIC_POSITION(pp) MTRC_POSN(pp.metric_line_length, pp.total_letter_space, pp.metric_resn, pp.pnts_font_size) 116 #define S_POINTS_POSITION(pp) PNTS_LS_LEN(pp.total_letter_space) + ((pp.metric_line_length * pp.pnts_font_size + pp.metric_resn - 1) / pp.metric_resn) 118 #define S_SPIXEL_POSITION(pp) (((((S_POINTS_POSITION(pp)) * 45) + pp.pixel_par_x - 1) / pp.pixel_par_x) + pp.spxl_tab_start) 122 #define P_PNTS_2_SPXL(pp, pts) ((((pts) * 45) + pp->pixel_par_x - 1) / pp->pixel_par_x) 123 #define P_MTRC_2_PNTS(pp, mtr) ((mtr) * pp->pnts_font_size + pp->metric_resn - 1) / pp->metric_resn 124 #define P_MTRC_2_SPXL(pp, mtr) P_PNTS_2_SPXL(pp, P_MTRC_2_PNTS(pp, mtr)) 126 #define P_METRIC_POSITION(pp) MTRC_POSN(pp->metric_line_length, pp->total_letter_space, pp->metric_resn, pp->pnts_font_size) 128 #define P_POINTS_POSITION(pp) PNTS_LS_LEN(pp->total_letter_space) + ((pp->metric_line_length * pp->pnts_font_size + pp->metric_resn - 1) / pp->metric_resn) 130 #define P_SPIXEL_POSITION(pp) (((((P_POINTS_POSITION(pp)) * 45) + pp->pixel_par_x - 1) / pp->pixel_par_x) + pp->spxl_tab_start) 216 for (nx = pLine->
start_ndx, pch = str; nx != pLine->
end_ndx && pch != str + 79; nx++, pch++)
218 *pch = (char)chars[nx].uni_chr;
221 DBG_PRINTF(
"Line %d: start=%ld width=%d start=%d end=%d F-Size=%d M-Res=%d\n",
230 sposn = ((mposn * f_size) + m_res - 1) / m_res;
231 sposn = ((sposn * 45) + 55) / 56;
246 while (line_num != total)
250 traceLine( lines, chars, f_size, m_res );
270 if ((*
data <= 0x5e) && (*
data >= 0x40))
272 mu_length =
data[1] + 1;
311 if ((ha != NULL) && (mu_length > 1) && (ha->
markup_state == 0))
313 U16BIT mu_lft = mu_length - 2;
324 if ((mu_ind & 0x40) && (mu_lft > 3))
330 if ((mu_ind & 0x20) && (mu_lft > 3))
336 if ((mu_ind & 0x10) && (mu_lft > 3))
586 tls = (tls + 255) / 256;
591 tls = (tls - 255) / 256;
624 kerning.x -= kerning.y >> 1;
628 kerning.x += kerning.y >> 2;
647 kerning.x -= kerning.y >> 1;
651 kerning.x += kerning.y >> 2;
679 FT_Face the_face = ftd_ptr->
face;
685 if (FT_Set_Char_Size( the_face, f_sz_data->
width, f_sz_data->
height, 72, 72 ) != 0)
687 TRACE(TERROR, (
"FT_Set_Char_Size FAILED: w=%u, h=%u\n", f_sz_data->
width, f_sz_data->
height))
698 if (FT_Get_PFR_Advance( the_face, pp->
glyph_index, &advance ) != 0)
710 if (FT_Load_Glyph( the_face, pp->
glyph_index, FT_LOAD_NO_SCALE ) != 0)
722 load_flags = FT_LOAD_RENDER;
731 if (u_chr == 0x00e3 || u_chr == 0x00f1 || u_chr == 0x00f5)
733 load_flags |= FT_LOAD_NO_AUTOHINT;
735 if (FT_Load_Glyph( the_face, pp->
glyph_index, load_flags ) != 0)
742 char_data->
width = the_face->glyph->bitmap.width;
743 pp->
char_left = the_face->glyph->bitmap_left;
749 pp->
char_adv = (
S8BIT)((the_face->glyph->linearHoriAdvance + 0x7fff) >> 16);
766 if ((the_face->glyph->linearHoriAdvance & 0x8000) &&
771 pp->
char_adv = (
S8BIT)(the_face->glyph->linearHoriAdvance >> 16);
775 pp->
char_adv = (
S8BIT)((the_face->glyph->linearHoriAdvance + 0x7fff) >> 16);
841 if ((new_posn % 45) != 0)
843 new_posn += 45 - (new_posn % 45);
864 FT_UInt mt_adv,
S8BIT pxl_adv )
880 char_data->
width = pxl_adv;
892 static void MinorAdjustOfPenPositionAtSpace(
S_PROPERTIES *pp )
900 TPRINT(TTEXT, (
"MAPP(%d,%d,%d,%d,%d)", pp->
total_letter_space, pp->
metric_line_length, psn, tmp, pp->
hpxl_pen_posn));
924 assert( chars[ndx].mtrc_position >= brk_posn );
941 CharData *p_start, *p_other, *p_last;
943 S32BIT fudge_size, fudge_last;
947 p_last = chars + line->
end_ndx - 1;
975 fudge_last = fudge_size;
976 p_other = p_last - 1;
978 while (p_other != p_start)
995 assert(p_other == p_start);
996 TRACE(TTEXT, (
"More fudging to do %d", fudge_size))
998 p_last = chars + line->
end_ndx - 1;
1000 while (p_other != p_last)
1008 if (fudge_size == 0)
1016 assert(p_other == p_last);
1019 while (fudge_size != fudge_last);
1020 TRACE(TERROR, (
"fudging failed to complete %d", fudge_size))
1077 S32BIT mleft, mhalf, rright, mright, b_wdth;
1085 p_ecd = chars + e_ndx;
1096 p_scd = chars + s_ndx;
1100 #ifdef ACCURATE_CENTRE_TRUNCATION 1102 mhalf = mright >> 1;
1104 while ((e_ndx != s_ndx) && (
P_MTRC_2_SPXL(pp, mright - mleft) > b_wdth))
1106 if (mright - mhalf > mhalf - mleft)
1123 mhalf = mright << 1;
1125 while ((e_ndx != s_ndx) && (
P_MTRC_2_SPXL(pp, mhalf - mright) > b_wdth))
1133 while ((e_ndx != s_ndx) && (
P_MTRC_2_SPXL(pp, mright - mleft) > b_wdth))
1147 assert(s_ndx <= (e_ndx + 1));
1175 AdjustLineEnding( pp, chars );
1179 AdjustLineMiddle( pp, chars, justify );
1180 FudgeForHD( pp, chars );
1184 FudgeForHD( pp, chars );
1217 while (lines[first].
line_num < num)
1225 lines[first] = lines[num];
1229 return &lines[first - 1];
1249 FT_Face the_face = ftd_ptr->
face;
1250 char_data->
gf_ndx = FT_Get_Char_Index( the_face, caret );
1251 if (FT_Load_Glyph( the_face, char_data->
gf_ndx, FT_LOAD_RENDER ) == 0)
1253 char_data->
width = the_face->glyph->bitmap.width;
1282 FT_UInt *hori_advance = ftd_ptr->
horiz_adv;
1285 U16BIT u_chr, uni_pos, char_count;
1288 U8BIT colour_count, hz_justify;
1307 InitialiseProperties( attrib, f_sz_data, &prop );
1312 spxl_avl_width = spxl_box_width;
1320 for (uni_pos = 0; uni_pos < unistr.
len; uni_pos++)
1324 AddCaretChar( &prop, ftd_ptr, f_sz_data, char_data, colour_stack[colour_count], attrib->
caret );
1328 u_chr = unistr.
data[uni_pos];
1338 TRACE(TTEXT, (
"Ignoring control char 0x%x", u_chr))
1362 if (uni_pos != unistr.
len)
1364 uni_pos += ProcessMarkup( &unistr.
data[uni_pos], colour_stack, &colour_count, attrib->
p_ha );
1371 MoveTabPosition( &prop );
1397 MinorAdjustOfPenPositionAtSpace( &prop );
1486 !LoadPrintableChar( ftd_ptr, f_sz_data, &prop, u_chr, char_data ))
1497 !LoadPrintableChar( ftd_ptr, f_sz_data, &prop, u_chr, char_data ))
1499 TRACE(TTEXT, (
"0x%x is not printable\n", u_chr))
1503 char_data->
colour = colour_stack[colour_count];
1515 DoTheKerning( attrib, ftd_ptr, &prop );
1520 if (tmp_adv < prop.p_current_line->
position)
1524 tmp_adv += char_data->
width;
1560 if (TTEXT & mheg_trace_debug)
1568 switch (break_state)
1574 ProcessWrappingBreak( &prop, chars, char_count );
1580 TRACE(TTEXT, (
"Over run at %d", char_count))
1599 if ((total_lines == available_lines) &&
1610 TRACE(TERROR, (
"Run out of line space"))
1614 prop.
p_current_line = ShuffleUpLines( lines, total_lines - available_lines );
1624 AddCaretChar( &prop, ftd_ptr, f_sz_data, char_data, colour_stack[colour_count], attrib->
caret );
1648 AdjustLineEnding( &prop, chars );
1652 AdjustLineMiddle( &prop, chars, attrib->
justify );
1653 FudgeForHD( &prop, chars );
1657 FudgeForHD( &prop, chars );
1671 *p_chr_cnt = char_count;
1681 #define TextDrawFn TextDraw8Bit 1682 #define RenderGlyphFn RenderGlyph8Bit 1683 #define TDColor U8BIT 1684 #define MakeTDColor(col) OSD_FindNearestColourIndex( col ) 1685 #define GreyValue(val) (val >> 6) 1686 #define SRC_FORE_MAX 3 1687 #define IsOpaqueColor( tcol ) (tcol >= OFFSET_OPAQUE) 1688 #define NotTransparent( fcol ) ((fcol >> 24) > 0x18) 1689 #define CombineAlphaColour(pixel, grey_val, fc, tc) if (grey_val) pixel = aa_8bit_cols[grey_val]; 1691 #define CalcColorArray(for_col) \ 1692 if ( aa_8bit_cols[3] != for_col) { \ 1693 U8BIT fa, ba, bck_col = aa_8bit_cols[0]; \ 1694 register U32BIT comp, tmp_c, alpha_c; \ 1695 comp = mg_palette[for_col] >> 24; \ 1696 ba = (U8BIT)(mg_palette[bck_col] >> 24); \ 1697 alpha_c = ((((255 ^ ba) * comp) + 382) / 765) + ba; \ 1698 tmp_c = alpha_c << 24; \ 1699 fa = (U8BIT)((comp + 1) / 3); \ 1701 ba = (U8BIT)(((255 ^ fa) * comp) + 127) / 255; \ 1702 comp = ba * ((mg_palette[bck_col] >> 16) & 0xff) + fa * ((mg_palette[for_col] >> 16) & 0xff); \ 1703 tmp_c |= (comp / alpha_c) << 16; \ 1704 comp = ba * ((mg_palette[bck_col] >> 8) & 0xff) + fa * ((mg_palette[for_col] >> 8) & 0xff); \ 1705 tmp_c |= (comp / alpha_c) << 8; \ 1706 comp = ba * (mg_palette[bck_col] & 0xff) + fa * (mg_palette[for_col] & 0xff); \ 1707 tmp_c |= (comp / alpha_c); \ 1708 aa_8bit_cols[1] = OSD_FindNearestColourIndex(tmp_c); \ 1709 comp = 2 * (mg_palette[for_col] >> 24); \ 1710 ba = (U8BIT)(mg_palette[bck_col] >> 24); \ 1711 alpha_c = ((((255 ^ ba) * comp) + 382) / 765) + ba; \ 1712 tmp_c = alpha_c << 24; \ 1713 fa = (U8BIT)((comp + 1) / 3); \ 1715 ba = (U8BIT)(((255 ^ fa) * comp) + 127) / 255; \ 1716 comp = ba * ((mg_palette[bck_col] >> 16) & 0xff) + fa * ((mg_palette[for_col] >> 16) & 0xff); \ 1717 tmp_c |= (comp / alpha_c) << 16; \ 1718 comp = ba * ((mg_palette[bck_col] >> 8) & 0xff) + fa * ((mg_palette[for_col] >> 8) & 0xff); \ 1719 tmp_c |= (comp / alpha_c) << 8; \ 1720 comp = ba * (mg_palette[bck_col] & 0xff) + fa * (mg_palette[for_col] & 0xff); \ 1721 tmp_c |= (comp / alpha_c); \ 1722 aa_8bit_cols[2] = OSD_FindNearestColourIndex(tmp_c); \ 1723 aa_8bit_cols[3] = for_col; \ 1726 static U8BIT aa_8bit_cols[4] = {OFFSET_TRANS, OFFSET_TRANS, OFFSET_TRANS, OFFSET_TRANS};
1731 #undef RenderGlyphFn 1733 #undef CalcColorArray 1737 #undef IsOpaqueColor 1738 #undef NotTransparent 1739 #undef CombineAlphaColour 1750 #define TextDrawFn TextDraw16Bit 1751 #define RenderGlyphFn RenderGlyph16Bit 1752 #define TDColor HD2Color 1753 #define MakeTDColor(col) MakeHD2Color( col ) 1754 #define GreyValue(val) val 1755 #define SRC_FORE_MAX 255 1756 #define IsOpaqueColor( tcol ) ((tcol >> 12) == 0xf) 1757 #define NotTransparent( fcol ) ((fcol >> 28) != 0x0) 1758 #define CombineAlphaColour(pixel, grey_val, full_col, fore_col) \ 1759 grey_val *= (full_col >> 24); \ 1760 if (grey_val & 0xf000) { pixel = (fore_col & 0x0fff) | (grey_val & 0xf000); } 1765 #undef RenderGlyphFn 1766 #undef CombineAlphaColour 1772 #define TextDrawFn TextDraw16BitBlend 1773 #define RenderGlyphFn RenderGlyph16Blend 1774 #define CombineAlphaColour(pixel, grey_val, full_col, fore_col) \ 1775 grey_val *= (full_col >> 24); \ 1776 if (grey_val & 0xff00) { \ 1777 register U32BIT fa, ba, comp, tmp_c, alpha_c; \ 1778 ba = (U8BIT)(pixel >> 12); \ 1780 alpha_c = ((((15 - ba) *grey_val) + 1912) / 3825) + comp; \ 1781 fa = (U8BIT)(grey_val / SRC_FORE_MAX); \ 1782 ba = (((255 ^ fa) *comp) + 127) / 255; \ 1783 tmp_c = (alpha_c / 17) << 12; \ 1784 comp = ba * ((pixel >> 8) & 0xf) + fa * ((fore_col >> 8) & 0xf); \ 1785 tmp_c |= ((comp + (alpha_c >> 1)) / alpha_c) << 8; \ 1786 comp = ba * ((pixel >> 4) & 0xf) + fa * ((fore_col >> 4) & 0xf); \ 1787 tmp_c |= ((comp + (alpha_c >> 1)) / alpha_c) << 4; \ 1788 comp = ba * (pixel & 0xf) + fa * (fore_col & 0xf); \ 1789 tmp_c |= ((comp + (alpha_c >> 1)) / alpha_c); \ 1790 pixel = (U16BIT)tmp_c; \ 1796 #undef RenderGlyphFn 1800 #undef IsOpaqueColor 1801 #undef NotTransparent 1802 #undef CombineAlphaColour 1807 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 1813 #define TextDrawFn TextDraw32Bit 1814 #define RenderGlyphFn RenderGlyph32Bit 1815 #define TDColor OSDColor 1816 #define GreyValue(val) val 1817 #define MakeTDColor(col) AlphaPlatform(col) 1818 #define SRC_FORE_MAX 255 1819 #define IsOpaqueColor( tcol ) ((tcol >> 24) == MAX_ALPHA) 1820 #define NotTransparent( fcol ) ((fcol >> 24) != 0x00) 1821 #define CombineAlphaColour(pixel, grey_val, full_col, fore_col) \ 1822 grey_val *= CalcAlpha(fore_col >> 24); \ 1823 if (grey_val > 127) { pixel = (fore_col & 0xffffff) | ((grey_val << 16) & 0xff000000); } 1828 #undef RenderGlyphFn 1829 #undef CombineAlphaColour 1835 #define TextDrawFn TextDraw32BitBlend 1836 #define RenderGlyphFn RenderGlyph32Blend 1837 #define CombineAlphaColour(pixel, grey_val, full_col, fore_col) \ 1838 grey_val *= CalcAlpha(fore_col >> 24); \ 1839 if (grey_val > 127) { \ 1840 register U32BIT fa, ba, comp, tmp_c, alpha_c; \ 1842 alpha_c = ((((MAX_ALPHA - ba) *grey_val) + ((MAX_ALPHA *255) / 2)) / (MAX_ALPHA *255)) + ba; \ 1843 fa = (U8BIT)(grey_val / SRC_FORE_MAX); \ 1844 ba = (((MAX_ALPHA - fa) *ba) + (MAX_ALPHA / 2)) / MAX_ALPHA; \ 1845 tmp_c = alpha_c << 24; \ 1846 comp = ba * ((pixel >> 16) & 0xff) + fa * ((fore_col >> 16) & 0xff); \ 1847 tmp_c |= ((comp + (alpha_c >> 1)) / alpha_c) << 16; \ 1848 comp = ba * ((pixel >> 8) & 0xff) + fa * ((fore_col >> 8) & 0xff); \ 1849 tmp_c |= ((comp + (alpha_c >> 1)) / alpha_c) << 8; \ 1850 comp = ba * (pixel & 0xff) + fa * (fore_col & 0xff); \ 1851 tmp_c |= ((comp + (alpha_c >> 1)) / alpha_c); \ 1858 #undef RenderGlyphFn 1862 #undef IsOpaqueColor 1863 #undef NotTransparent 1864 #undef SignificantFore 1865 #undef CombineAlphaColour 1872 U32BIT m_size, glph_count;
1883 for (glph_count = 0; glph_count != unistr.
len; glph_count++)
1885 switch (unistr.
data[glph_count])
1888 if (glph_count + 1 != unistr.
len)
1892 if ((unistr.
data[glph_count] <= 0x5e) &&
1893 (unistr.
data[glph_count] >= 0x40) &&
1894 (glph_count + 1 != unistr.
len))
1897 if ((glph_count + unistr.
data[glph_count]) <= unistr.
len)
1899 glph_count += unistr.
data[glph_count];
1918 if (unistr.
data[glph_count] > 0x20)
1933 TRACE(TTEXT, (
"malloc char_data array (sz=%d) at 0x%x", m_size, char_data))
1961 U16BIT line_count, glph_count;
1970 if ((f_szdata != NULL) &&
1977 TRACE(TTEXT, (
"font=%x width=%d, height=%d posn=(%d,%d) ls=%d", attrib->
font.
hdl->
fnt_id,
1999 TRACE(TERROR, (
"Num of text lines was restricted from %d to %d", available_lines,
MAX_NUM_LINES))
2006 char_data = GetCharArray( unistr, attrib, chars );
2007 if (char_data == NULL)
2013 line_count = PreparePrintableData( unistr, attrib, f_szdata, font_ptr, draw.
right - draw.
left,
2014 (
U16BIT)txt_box.
width, available_lines, lines, char_data, &glph_count );
2015 if (line_count > 0 && glph_count > 0)
2019 TRACE(TTEXT, (
"lines(%d,%d) left=%d avl_width=%d", available_lines, line_count, f_szdata->
bound_box.
left,
2021 if (TTEXT & mheg_trace_debug)
2036 available_lines = line_count;
2048 OSD_FindNearestColourIndex(0x00000000),
2051 TextDraw8Bit( lines, char_data, f_szdata, font_ptr->
face,
2054 line_count, available_lines, canvas );
2070 TextDraw16Bit( lines, char_data, f_szdata, font_ptr->
face,
2073 line_count, available_lines, canvas );
2082 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 2092 TextDraw32Bit( lines, char_data, f_szdata, font_ptr->
face,
2095 line_count, available_lines, canvas );
2104 if (char_data != chars)
2110 TRACE(TTEXT, (
"return=0x%x\n", canvas))
2129 U16BIT line_count, glph_count;
2140 TRACE(TERROR, (
"f_sz NULL"))
2149 char_data = GetCharArray( unistr, attrib, chars );
2150 if (char_data != NULL)
2156 if (line_count == 0)
2160 if (char_data != chars)
2185 U16BIT line_count, glph_count;
2194 if (f_szdata != NULL && canvas != NULL && canvas->
col_buff != NULL &&
2202 char_data = GetCharArray( unistr, attrib, chars );
2203 if (char_data != NULL)
2206 line_count = PreparePrintableData( unistr, attrib, f_szdata, font_ptr, canvas->
width,
2207 canvas->
width, 1, lines, char_data, &glph_count );
2208 if (line_count > 0 && glph_count > 0)
2211 TRACE(TTEXT, (
"lines(%d,%d)", 1, line_count))
2212 if (TTEXT & mheg_trace_debug)
2223 TextDraw8Bit( lines, char_data, f_szdata, font_ptr->
face,
2226 line_count, 1, canvas );
2232 TextDraw16BitBlend( lines, char_data, f_szdata, font_ptr->
face,
2235 line_count, 1, canvas );
2241 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 2242 TextDraw32BitBlend( lines, char_data, f_szdata, font_ptr->
face,
2245 line_count, 1, canvas );
2251 if (char_data != chars)
2260 if (f_szdata != NULL && canvas != NULL)
2280 return MG_DrawHKText( unistr, attrib, txt_box );
#define TRANSPARENT_COLOUR
void * MG_DrawUKText(const TextString unistr, pDrawTextAttrib attrib, const VRect txt_box)
Create Surface and draw text string on it and terminate freetype library.
S16BIT MG_TextWidth(const TextString unistr, pDrawTextAttrib attrib)
void MG_DrawScreenText(const TextString unistr, pDrawTextAttrib attrib, S_SURFACE *canvas)
Single line text string drawn on existing Surface.
#define MTRC_POSN(mll, tls, mr, fsz)
struct s_properties S_PROPERTIES
#define TRACE_UNIC(t, d, l)
#define JUSTIFY_H_JUSTIFIED
Font file handling with the Freetype.
#define COLOUR_FORMAT_ARGB4444
void * MG_DrawText(const TextString unistr, pDrawTextAttrib attrib, const VRect txt_box)
Create Surface and draw text string on it and terminate freetype library.
void * STB_OSDMhegCreateSurface(U16BIT width, U16BIT height, BOOLEAN init, U32BIT colour)
Creates a hardware surface on which MHEG5 engine will draw an individual MHEG object. At its basic the function can just allocate the buffer to be returned by STB_OSDMhegLockBuffer(). It's size being: (width * height * bytes_per_pixel) Also, when 'init' is TRUE, function initialises surface buffer to the specified colour. For pixel colour format of less than four bytes, use least significant bits of 'colour'.
#define FONT_STYLE_NO_SCALE
#define S_SPIXEL_POSITION(pp)
S32BIT total_letter_space
#define P_POINTS_POSITION(pp)
#define UNICODE_TEXT_COLOUR_START
#define S_METRIC_POSITION(pp)
S32BIT hpxl_letter_offset
S32BIT metric_break_length
#define COLOUR_STACK_SIZE
#define UNICODE_HYPER_ANCHOR_START
FT_UInt horiz_adv[CHAR_CACHE_SIZE]
S32BIT metric_line_length
#define P_MTRC_2_SPXL(pp, mtr)
#define FONT_STYLE_SQUARE
#define OSD_DbgAddSurf(s)
#define UNICODE_HYPER_ANCHOR_END
#define JUSTIFY_V_JUSTIFIED
#define P_METRIC_POSITION(pp)
struct _LineLimit LineLimit
#define COLOUR_FORMAT_PALETTE
#define UNICODE_FIGURE_SPACE
#define P_SPIXEL_POSITION(pp)
#define UNICODE_HARD_SPACE
FT_UInt glyph_ndx[CHAR_CACHE_SIZE]
struct _CharData CharData
void * STB_OSDMhegLockBuffer(void *surface, U32BIT *pPitch)
Converts hardware surface handle returned by STB_OSDMhegCreateSurface() to buffer address that the en...
S_FontDetails * MG_FindFont(H_FontSize f_sz)
Get font from size.
MHEG text render that uses the Freetype font library.
S32BIT break_letter_space
void MG_CheckCache(S_FontSize *f_szdata)
Interface to the MHEG text render that uses Freetype font library.
#define UNICODE_HYPER_ATTRIB_START
#define UNICODE_TEXT_COLOUR_END
FT_UInt metric_resolution
LineLimit * p_current_line
Interface to the MHEG text render that uses Freetype font library.
Graphics functions required by the HD MHEG5 engine. All references to colour used in these functions ...
void ProcessNewLine(S_PROPERTIES *pp, CharData *chars, S_FontSize *f_sz_data, U16BIT line_num, U8BIT justify)
Process for adding a new line.
void STB_OSDMhegUnlockBuffer(void *surface)
This function informs HW that MHEG5 is finished writing to the buffer.
#define UNICODE_HYPER_ATTRIB_END
union _DrawTextAttrib::@14 font