Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
Add story.
Commit Description:
Add story.
using Microsoft.Xna.Framework ;
using System.Collections.Generic ;
namespace FontStashSharp
{
internal class FontGlyph
{
private readonly Dictionary < int , int > _kernings = new Dictionary < int , int >();
public Font Font ;
public FontAtlas Atlas ;
public int Codepoint ;
public int Index ;
public int Size ;
public Rectangle Bounds ;
public int XAdvance ;
public int XOffset ;
public int YOffset ;
public bool IsEmpty
{
get
{
return Bounds . Width == 0 || Bounds . Height == 0 ;
}
}
public int GetKerning ( FontGlyph nextGlyph )
{
int result ;
if ( _kernings . TryGetValue ( nextGlyph . Index , out result ))
{
return result ;
}
result = StbTrueTypeSharp . StbTrueType . stbtt_GetGlyphKernAdvance ( Font . _font , Index , nextGlyph . Index );
_kernings [ nextGlyph . Index ] = result ;
return result ;
}
}
}
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings