Fixed typo
Former-commit-id: 1482a9580b19f657cccaadbbf4eacc9724d0a1e3
This commit is contained in:
parent
7fee649b49
commit
b699d06805
|
|
@ -72,7 +72,7 @@ class NAZARA_API NzFont : public NzResource, NzAbstractAtlas::Listener, NzNonCop
|
||||||
|
|
||||||
void SetAtlas(std::shared_ptr<NzAbstractAtlas> atlas);
|
void SetAtlas(std::shared_ptr<NzAbstractAtlas> atlas);
|
||||||
void SetGlyphBorder(unsigned int borderSize);
|
void SetGlyphBorder(unsigned int borderSize);
|
||||||
void SetMinimumStepSize(unsigned int minimumSizeStep);
|
void SetMinimumStepSize(unsigned int minimumStepSize);
|
||||||
|
|
||||||
static std::shared_ptr<NzAbstractAtlas> GetDefaultAtlas();
|
static std::shared_ptr<NzAbstractAtlas> GetDefaultAtlas();
|
||||||
static unsigned int GetDefaultGlyphBorder();
|
static unsigned int GetDefaultGlyphBorder();
|
||||||
|
|
@ -82,7 +82,7 @@ class NAZARA_API NzFont : public NzResource, NzAbstractAtlas::Listener, NzNonCop
|
||||||
|
|
||||||
static void SetDefaultAtlas(const std::shared_ptr<NzAbstractAtlas>& atlas);
|
static void SetDefaultAtlas(const std::shared_ptr<NzAbstractAtlas>& atlas);
|
||||||
static void SetDefaultGlyphBorder(unsigned int borderSize);
|
static void SetDefaultGlyphBorder(unsigned int borderSize);
|
||||||
static void SetDefaultMinimumStepSize(unsigned int minimumSizeStep);
|
static void SetDefaultMinimumStepSize(unsigned int minimumStepSize);
|
||||||
|
|
||||||
static void Uninitialize();
|
static void Uninitialize();
|
||||||
|
|
||||||
|
|
@ -130,12 +130,12 @@ class NAZARA_API NzFont : public NzResource, NzAbstractAtlas::Listener, NzNonCop
|
||||||
mutable std::unordered_map<nzUInt64, GlyphMap> m_glyphes;
|
mutable std::unordered_map<nzUInt64, GlyphMap> m_glyphes;
|
||||||
mutable std::unordered_map<nzUInt64, SizeInfo> m_sizeInfoCache;
|
mutable std::unordered_map<nzUInt64, SizeInfo> m_sizeInfoCache;
|
||||||
unsigned int m_glyphBorder;
|
unsigned int m_glyphBorder;
|
||||||
unsigned int m_minimumSizeStep;
|
unsigned int m_minimumStepSize;
|
||||||
|
|
||||||
static std::shared_ptr<NzAbstractAtlas> s_defaultAtlas;
|
static std::shared_ptr<NzAbstractAtlas> s_defaultAtlas;
|
||||||
static NzFontLoader::LoaderList s_loaders;
|
static NzFontLoader::LoaderList s_loaders;
|
||||||
static unsigned int s_defaultGlyphBorder;
|
static unsigned int s_defaultGlyphBorder;
|
||||||
static unsigned int s_defaultMinimumSizeStep;
|
static unsigned int s_defaultMinimumStepSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NAZARA_FONT_HPP
|
#endif // NAZARA_FONT_HPP
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ bool NzFontParams::IsValid() const
|
||||||
NzFont::NzFont() :
|
NzFont::NzFont() :
|
||||||
m_atlas(s_defaultAtlas),
|
m_atlas(s_defaultAtlas),
|
||||||
m_glyphBorder(s_defaultGlyphBorder),
|
m_glyphBorder(s_defaultGlyphBorder),
|
||||||
m_minimumSizeStep(s_defaultMinimumSizeStep)
|
m_minimumStepSize(s_defaultMinimumStepSize)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -182,7 +182,7 @@ unsigned int NzFont::GetGlyphBorder() const
|
||||||
|
|
||||||
unsigned int NzFont::GetMinimumStepSize() const
|
unsigned int NzFont::GetMinimumStepSize() const
|
||||||
{
|
{
|
||||||
return m_minimumSizeStep;
|
return m_minimumStepSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
const NzFont::SizeInfo& NzFont::GetSizeInfo(unsigned int characterSize) const
|
const NzFont::SizeInfo& NzFont::GetSizeInfo(unsigned int characterSize) const
|
||||||
|
|
@ -305,7 +305,7 @@ void NzFont::SetGlyphBorder(unsigned int borderSize)
|
||||||
|
|
||||||
void NzFont::SetMinimumStepSize(unsigned int minimumStepSize)
|
void NzFont::SetMinimumStepSize(unsigned int minimumStepSize)
|
||||||
{
|
{
|
||||||
if (m_minimumSizeStep != minimumStepSize)
|
if (m_minimumStepSize != minimumStepSize)
|
||||||
{
|
{
|
||||||
#if NAZARA_UTILITY_SAFE
|
#if NAZARA_UTILITY_SAFE
|
||||||
if (minimumStepSize == 0)
|
if (minimumStepSize == 0)
|
||||||
|
|
@ -315,7 +315,7 @@ void NzFont::SetMinimumStepSize(unsigned int minimumStepSize)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_minimumSizeStep = minimumStepSize;
|
m_minimumStepSize = minimumStepSize;
|
||||||
ClearGlyphCache();
|
ClearGlyphCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -332,14 +332,14 @@ unsigned int NzFont::GetDefaultGlyphBorder()
|
||||||
|
|
||||||
unsigned int NzFont::GetDefaultMinimumStepSize()
|
unsigned int NzFont::GetDefaultMinimumStepSize()
|
||||||
{
|
{
|
||||||
return s_defaultMinimumSizeStep;
|
return s_defaultMinimumStepSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NzFont::Initialize()
|
bool NzFont::Initialize()
|
||||||
{
|
{
|
||||||
s_defaultAtlas.reset(new NzGuillotineImageAtlas);
|
s_defaultAtlas.reset(new NzGuillotineImageAtlas);
|
||||||
s_defaultGlyphBorder = 1;
|
s_defaultGlyphBorder = 1;
|
||||||
s_defaultMinimumSizeStep = 1;
|
s_defaultMinimumStepSize = 1;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -354,7 +354,7 @@ void NzFont::SetDefaultGlyphBorder(unsigned int borderSize)
|
||||||
s_defaultGlyphBorder = borderSize;
|
s_defaultGlyphBorder = borderSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NzFont::SetDefaultMinimumStepSize(unsigned int minimumSizeStep)
|
void NzFont::SetDefaultMinimumStepSize(unsigned int minimumStepSize)
|
||||||
{
|
{
|
||||||
#if NAZARA_UTILITY_SAFE
|
#if NAZARA_UTILITY_SAFE
|
||||||
if (minimumStepSize == 0)
|
if (minimumStepSize == 0)
|
||||||
|
|
@ -364,7 +364,7 @@ void NzFont::SetDefaultMinimumStepSize(unsigned int minimumSizeStep)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
s_defaultMinimumSizeStep = minimumSizeStep;
|
s_defaultMinimumStepSize = minimumStepSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NzFont::Uninitialize()
|
void NzFont::Uninitialize()
|
||||||
|
|
@ -375,7 +375,7 @@ void NzFont::Uninitialize()
|
||||||
nzUInt64 NzFont::ComputeKey(unsigned int characterSize, nzUInt32 style) const
|
nzUInt64 NzFont::ComputeKey(unsigned int characterSize, nzUInt32 style) const
|
||||||
{
|
{
|
||||||
// On prend le pas en compte
|
// On prend le pas en compte
|
||||||
nzUInt64 sizePart = static_cast<nzUInt32>((characterSize/m_minimumSizeStep)*m_minimumSizeStep);
|
nzUInt64 sizePart = static_cast<nzUInt32>((characterSize/m_minimumStepSize)*m_minimumStepSize);
|
||||||
|
|
||||||
// Ainsi que le style (uniquement le gras et l'italique, les autres sont gérés par un TextDrawer)
|
// Ainsi que le style (uniquement le gras et l'italique, les autres sont gérés par un TextDrawer)
|
||||||
nzUInt64 stylePart = 0;
|
nzUInt64 stylePart = 0;
|
||||||
|
|
@ -547,4 +547,4 @@ const NzFont::Glyph& NzFont::PrecacheGlyph(GlyphMap& glyphMap, unsigned int char
|
||||||
std::shared_ptr<NzAbstractAtlas> NzFont::s_defaultAtlas;
|
std::shared_ptr<NzAbstractAtlas> NzFont::s_defaultAtlas;
|
||||||
NzFontLoader::LoaderList NzFont::s_loaders;
|
NzFontLoader::LoaderList NzFont::s_loaders;
|
||||||
unsigned int NzFont::s_defaultGlyphBorder;
|
unsigned int NzFont::s_defaultGlyphBorder;
|
||||||
unsigned int NzFont::s_defaultMinimumSizeStep;
|
unsigned int NzFont::s_defaultMinimumStepSize;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue