MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / Width

Method Width

other_src/ftgl/src/FTSize.cpp:101–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100
101float FTSize::Width() const
102{
103 if(0 == ftSize)
104 {
105 return 0.0f;
106 }
107
108 if(FT_IS_SCALABLE((*ftFace)))
109 {
110 return ((*ftFace)->bbox.xMax - (*ftFace)->bbox.xMin) * (static_cast<float>(ftSize->metrics.x_ppem) / static_cast<float>((*ftFace)->units_per_EM));
111 }
112 else
113 {
114 return static_cast<float>(ftSize->metrics.max_advance) / 64.0f;
115 }
116}
117
118
119float FTSize::Underline() const

Callers 4

testConstructorMethod · 0.80
testSetCharSizeMethod · 0.80
MakeGlyphImplMethod · 0.80
FTBufferGlyph.cppFile · 0.80

Calls

no outgoing calls

Tested by 2

testConstructorMethod · 0.64
testSetCharSizeMethod · 0.64