mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Fully remove bitmap font support (#11863)
Freetype is now a build requirement.
This commit is contained in:
parent
bf22569019
commit
76dbd0d2d0
50 changed files with 71 additions and 319 deletions
|
@ -12,17 +12,12 @@
|
|||
#include <rect.h>
|
||||
#include <SColor.h>
|
||||
|
||||
#if USE_FREETYPE
|
||||
#include "CGUITTFont.h"
|
||||
#endif
|
||||
|
||||
#include "CGUITTFont.h"
|
||||
#include "util/string.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
#if USE_FREETYPE
|
||||
|
||||
namespace gui
|
||||
{
|
||||
//! constructor
|
||||
|
@ -108,14 +103,12 @@ void StaticText::draw()
|
|||
font->getDimension(str.c_str()).Width;
|
||||
}
|
||||
|
||||
#if USE_FREETYPE
|
||||
if (font->getType() == irr::gui::EGFT_CUSTOM) {
|
||||
irr::gui::CGUITTFont *tmp = static_cast<irr::gui::CGUITTFont*>(font);
|
||||
CGUITTFont *tmp = static_cast<CGUITTFont*>(font);
|
||||
tmp->draw(str,
|
||||
r, HAlign == EGUIA_CENTER, VAlign == EGUIA_CENTER,
|
||||
(RestrainTextInside ? &AbsoluteClippingRect : NULL));
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
// Draw non-colored text
|
||||
font->draw(str.c_str(),
|
||||
|
@ -590,8 +583,6 @@ s32 StaticText::getTextWidth() const
|
|||
|
||||
} // end namespace gui
|
||||
|
||||
#endif // USE_FREETYPE
|
||||
|
||||
} // end namespace irr
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue