+void Video_GetTextDims(tFont *Font, const char *Text, int *W, int *H)
+{
+ int w=0, h=0;
+ uint32_t ch;
+ tGlyph *glyph;
+ if( !Font ) Font = &gSystemFont;
+
+ while( *Text )
+ {
+ Text += ReadUTF8(Text, &ch);
+ glyph = _GetGlyph(Font, ch);
+ if( !glyph ) continue;
+
+ w += glyph->Width;
+ if( h < glyph->Height ) h = glyph->Height;
+ }
+
+ if(W) *W = w;
+ if(H) *H = h;
+}
+