From 405cf80eb8dc2df8ae160aee70aef34052add24a Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Tue, 5 May 2009 23:10:32 +0000 Subject: Big, big commit!! 1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2 2) Remove the old bmfont 3) Remove ftfont and bFTGL library 4) Implement a new BLF_draw_default function for place that still need/use the old BMF api. I try to update both, scons and cmake, but I only can test with make, so hope all work fine. MSVC is broken, but I don't have Windows, things to search and fix are any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont). Always have to link/include the freetype2 library Remove any reference to libbmfont Remove any reference to libftfont Remove any reference to libbftgl (or libbFTGL) --- extern/bFTGL/src/FTSize.cpp | 105 -------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 extern/bFTGL/src/FTSize.cpp (limited to 'extern/bFTGL/src/FTSize.cpp') diff --git a/extern/bFTGL/src/FTSize.cpp b/extern/bFTGL/src/FTSize.cpp deleted file mode 100644 index 5fb8ffba157..00000000000 --- a/extern/bFTGL/src/FTSize.cpp +++ /dev/null @@ -1,105 +0,0 @@ -#include "FTSize.h" - - -FTSize::FTSize() -: ftFace(0), - ftSize(0), - size(0), - err(0) -{} - - -FTSize::~FTSize() -{} - - -bool FTSize::CharSize( FT_Face* face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution ) -{ - err = FT_Set_Char_Size( *face, 0L, point_size * 64, x_resolution, y_resolution); - - if( !err) - { - ftFace = face; - size = point_size; - ftSize = (*ftFace)->size; - } - else - { - ftFace = 0; - size = 0; - ftSize = 0; - } - - return !err; -} - - -unsigned int FTSize::CharSize() const -{ - return size; -} - - -float FTSize::Ascender() const -{ - return ftSize == 0 ? 0.0f : static_cast( ftSize->metrics.ascender) / 64.0f; -} - - -float FTSize::Descender() const -{ - return ftSize == 0 ? 0.0f : static_cast( ftSize->metrics.descender) / 64.0f; -} - - -float FTSize::Height() const -{ - if( 0 == ftSize) - { - return 0.0f; - } - - if( FT_IS_SCALABLE((*ftFace))) - { - return ( (*ftFace)->bbox.yMax - (*ftFace)->bbox.yMin) * ( (float)ftSize->metrics.y_ppem / (float)(*ftFace)->units_per_EM); - } - else - { - return static_cast( ftSize->metrics.height) / 64.0f; - } -} - - -float FTSize::Width() const -{ - if( 0 == ftSize) - { - return 0.0f; - } - - if( FT_IS_SCALABLE((*ftFace))) - { - return ( (*ftFace)->bbox.xMax - (*ftFace)->bbox.xMin) * ( static_cast(ftSize->metrics.x_ppem) / static_cast((*ftFace)->units_per_EM)); - } - else - { - return static_cast( ftSize->metrics.max_advance) / 64.0f; - } -} - - -float FTSize::Underline() const -{ - return 0.0f; -} - -unsigned int FTSize::XPixelsPerEm() const -{ - return ftSize == 0 ? 0 : ftSize->metrics.x_ppem; -} - -unsigned int FTSize::YPixelsPerEm() const -{ - return ftSize == 0 ? 0 : ftSize->metrics.y_ppem; -} - -- cgit v1.2.3