2015-03-20, 22:20
I'm late to the party and not sure if it's in any way related, but underlining text would be a welcome addition too as far as I'm concerned. Especially if it could be used for a button's focused state.
(2015-03-20, 22:20)Jeroen Wrote: I'm late to the party and not sure if it's in any way related, but underlining text would be a welcome addition too as far as I'm concerned. Especially if it could be used for a button's focused state.
Strength Value
-------- -----
Medium / 8
Semi bold / 16
Bold / 24
Extra bold / 32
Black / 40
<label>[CAPITALIZE]20367[/CAPITALIZE]</label>
(2015-04-12, 12:15)Hitcher Wrote: As requested here's some test code for Confluence.
Change line 153 in MyVideoNav.xml to -
Code:<label>[CAPITALIZE]20367[/CAPITALIZE]</label>
Then navigate to the side menu and you'll see '20367' instead of 'Hide Watched'.
Thanks.
<label>[CAPITALIZE]$LOCALIZE[20367][/CAPITALIZE]</label>
watch gallery
-24 Thin (Hairline)
-36 Extra Light (Ultra Light)
-48 Light
N/A Normal
48 Medium
36 Semi Bold
24 Bold
18 Extra Bold
12 Heavy
// Embolden code - original taken from freetype2 (ftsynth.c)
void CGUIFontTTFBase::EmboldenGlyph(FT_GlyphSlot slot)
{
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
return;
/* some reasonable strength */
FT_Pos strength = FT_MulFix( m_face->units_per_EM,
m_face->size->metrics.y_scale ) / 24;
FT_BBox bbox_before, bbox_after;
FT_Outline_Get_CBox( &slot->outline, &bbox_before );
FT_Outline_Embolden( &slot->outline, strength ); // ignore error
FT_Outline_Get_CBox( &slot->outline, &bbox_after );
FT_Pos dx = bbox_after.xMax - bbox_before.xMax;
FT_Pos dy = bbox_after.yMax - bbox_before.yMax;
if ( slot->advance.x )
slot->advance.x += dx;
if ( slot->advance.y )
slot->advance.y += dy;
slot->metrics.width += dx;
slot->metrics.height += dy;
slot->metrics.horiBearingY += dy;
slot->metrics.horiAdvance += dx;
slot->metrics.vertBearingX -= dx / 2;
slot->metrics.vertBearingY += dy;
slot->metrics.vertAdvance += dy;
}