Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Borghetti <bdiego@gmail.com>2009-05-06 03:10:32 +0400
committerDiego Borghetti <bdiego@gmail.com>2009-05-06 03:10:32 +0400
commit405cf80eb8dc2df8ae160aee70aef34052add24a (patch)
treef03cc27e95bdf91b25ea9d2a0dffb28ccef666be /source/blender/editors
parent71c38978e14ebf3522fe60fc239ad04f10ef30ab (diff)
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)
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/CMakeLists.txt4
-rw-r--r--source/blender/editors/armature/Makefile1
-rw-r--r--source/blender/editors/armature/SConscript2
-rw-r--r--source/blender/editors/armature/editarmature.c2
-rw-r--r--source/blender/editors/armature/reeb.c2
-rw-r--r--source/blender/editors/curve/Makefile1
-rw-r--r--source/blender/editors/curve/SConscript2
-rw-r--r--source/blender/editors/curve/editcurve.c2
-rw-r--r--source/blender/editors/gpencil/Makefile1
-rw-r--r--source/blender/editors/gpencil/SConscript2
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c5
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c2
-rw-r--r--source/blender/editors/interface/Makefile2
-rw-r--r--source/blender/editors/interface/SConscript4
-rw-r--r--source/blender/editors/interface/interface_style.c15
-rw-r--r--source/blender/editors/interface/view2d.c5
-rw-r--r--source/blender/editors/mesh/Makefile1
-rw-r--r--source/blender/editors/mesh/SConscript2
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c2
-rw-r--r--source/blender/editors/object/Makefile1
-rw-r--r--source/blender/editors/object/SConscript2
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/physics/Makefile1
-rw-r--r--source/blender/editors/physics/SConscript2
-rw-r--r--source/blender/editors/preview/Makefile1
-rw-r--r--source/blender/editors/preview/SConscript2
-rw-r--r--source/blender/editors/screen/CMakeLists.txt4
-rw-r--r--source/blender/editors/screen/Makefile2
-rw-r--r--source/blender/editors/screen/SConscript2
-rw-r--r--source/blender/editors/screen/area.c6
-rw-r--r--source/blender/editors/sculpt_paint/Makefile1
-rw-r--r--source/blender/editors/sculpt_paint/SConscript2
-rw-r--r--source/blender/editors/space_file/Makefile1
-rw-r--r--source/blender/editors/space_file/SConscript2
-rw-r--r--source/blender/editors/space_file/file_draw.c1
-rw-r--r--source/blender/editors/space_node/Makefile1
-rw-r--r--source/blender/editors/space_node/SConscript2
-rw-r--r--source/blender/editors/space_node/drawnode.c2
-rw-r--r--source/blender/editors/space_node/node_draw.c1
-rw-r--r--source/blender/editors/space_outliner/outliner.c3
-rw-r--r--source/blender/editors/space_sequencer/Makefile2
-rw-r--r--source/blender/editors/space_sequencer/SConscript2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c19
-rw-r--r--source/blender/editors/space_text/SConscript2
-rw-r--r--source/blender/editors/space_text/text_intern.h1
-rw-r--r--source/blender/editors/space_view3d/Makefile2
-rw-r--r--source/blender/editors/space_view3d/SConscript4
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c21
-rw-r--r--source/blender/editors/space_view3d/drawobject.c55
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c25
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c2
-rw-r--r--source/blender/editors/transform/Makefile1
-rw-r--r--source/blender/editors/transform/SConscript2
54 files changed, 81 insertions, 157 deletions
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt
index 06b0fb4ab41..914fdaa4bc6 100644
--- a/source/blender/editors/CMakeLists.txt
+++ b/source/blender/editors/CMakeLists.txt
@@ -30,7 +30,7 @@ SET(INC ../windowmanager
../editors/include
../../../intern/guardedalloc ../../../intern/memutil
../blenlib ../makesdna ../makesrna ../blenkernel
- ../include ../../../intern/bmfont ../imbuf ../render/extern/include
+ ../include ../imbuf ../render/extern/include
../../../intern/bsp/extern ../radiosity/extern/include
../../../intern/decimation/extern ../blenloader ../python
../../kernel/gen_system ../../../intern/SoundSystem ../readstreamglue
@@ -43,9 +43,7 @@ SET(INC ../windowmanager
)
IF(WITH_INTERNATIONAL)
- SET(INC ${INC} ../ftfont)
ADD_DEFINITIONS(-DINTERNATIONAL)
- ADD_DEFINITIONS(-DFTGL_STATIC_LIBRARY)
ENDIF(WITH_INTERNATIONAL)
IF(WITH_OPENEXR)
diff --git a/source/blender/editors/armature/Makefile b/source/blender/editors/armature/Makefile
index f8cbb5ab37e..6c7ce81a8a1 100644
--- a/source/blender/editors/armature/Makefile
+++ b/source/blender/editors/armature/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_OPENNL)/include
# not very neat....
diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript
index e4e42a27b36..f96d25b0fe0 100644
--- a/source/blender/editors/armature/SConscript
+++ b/source/blender/editors/armature/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont'
+incs += ' ../../render/extern/include #/intern/guardedalloc'
incs += ' ../../gpu ../../makesrna #/intern/opennl/extern'
env.BlenderLib ( 'bf_editors_armature', sources, Split(incs), [], libtype=['core'], priority=[44] )
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index ca0694a7ece..98f51a4015d 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -33,8 +33,6 @@
#include "MEM_guardedalloc.h"
-#include "BMF_Api.h"
-
#include "DNA_action_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 5a636672f29..7e6c84764ae 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -53,8 +53,6 @@
//#include "BDR_editobject.h"
-#include "BMF_Api.h"
-
#include "ED_mesh.h"
#include "ED_armature.h"
//#include "BIF_interface.h"
diff --git a/source/blender/editors/curve/Makefile b/source/blender/editors/curve/Makefile
index b27749ce6fd..6b1f628f231 100644
--- a/source/blender/editors/curve/Makefile
+++ b/source/blender/editors/curve/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_ELBEEM)/include
diff --git a/source/blender/editors/curve/SConscript b/source/blender/editors/curve/SConscript
index 92c982db611..3a1930899d3 100644
--- a/source/blender/editors/curve/SConscript
+++ b/source/blender/editors/curve/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu'
+incs += ' #/intern/guardedalloc ../../gpu'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
env.BlenderLib ( 'bf_editors_curve', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 78b86ad7f32..c60007680ba 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -38,8 +38,6 @@
#include <stdlib.h>
#include "MEM_guardedalloc.h"
-#include "BMF_Api.h"
-
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
#include "BLI_dynstr.h"
diff --git a/source/blender/editors/gpencil/Makefile b/source/blender/editors/gpencil/Makefile
index bb76c9c2b23..f4c1cd246f4 100644
--- a/source/blender/editors/gpencil/Makefile
+++ b/source/blender/editors/gpencil/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_ELBEEM)/include
diff --git a/source/blender/editors/gpencil/SConscript b/source/blender/editors/gpencil/SConscript
index 6c47b2f69ff..af3cbdb901d 100644
--- a/source/blender/editors/gpencil/SConscript
+++ b/source/blender/editors/gpencil/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu'
+incs += ' #/intern/guardedalloc ../../gpu'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
env.BlenderLib ( 'bf_editors_gpencil', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index fd59539bb56..5c6294022ee 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -37,8 +37,6 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-#include "BMF_Api.h"
-
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
@@ -907,8 +905,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
/* only draw it if view is wide enough (assume padding of 20 is enough for now) */
if (winx > (xmax + 20)) {
- glRasterPos2i(winx-xmax, winy-20);
- BMF_DrawString(G.fonts, printable);
+ BLF_draw_default(winx-xmax, winy-20, 0.0f, printable);
}
}
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index 28748d4a631..8be56dc416e 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -33,8 +33,6 @@
#include "MEM_guardedalloc.h"
-#include "BMF_Api.h"
-
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index a745e5f4084..d84b93267a6 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -33,8 +33,6 @@
#include "MEM_guardedalloc.h"
-#include "BMF_Api.h"
-
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
diff --git a/source/blender/editors/interface/Makefile b/source/blender/editors/interface/Makefile
index fa9550041c5..dfc8187de49 100644
--- a/source/blender/editors/interface/Makefile
+++ b/source/blender/editors/interface/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../windowmanager
@@ -48,7 +47,6 @@ CPPFLAGS += -I../../blenlib
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../makesrna
CPPFLAGS += -I../../imbuf
-CPPFLAGS += -I../../ftfont
CPPFLAGS += -I../../blenfont
# own include
diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript
index fa89cd4891c..bac3742c12f 100644
--- a/source/blender/editors/interface/SConscript
+++ b/source/blender/editors/interface/SConscript
@@ -7,14 +7,12 @@ for source in env.Glob('*_api.c'):
sources.remove(source)
incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf'
-incs += ' ../../makesrna ../../windowmanager #/intern/guardedalloc #intern/bmfont'
+incs += ' ../../makesrna ../../windowmanager #/intern/guardedalloc'
incs += ' #/extern/glew/include'
defs = []
if env['WITH_BF_INTERNATIONAL']:
- incs += ' ../../ftfont'
defs.append('INTERNATIONAL')
- defs.append('FTGL_STATIC_LIBRARY')
env.BlenderLib ( 'bf_editors_interface', sources, Split(incs), Split(defs), libtype=['core'], priority=[110] )
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 8c07a6ea0ab..d0361174e70 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -171,11 +171,7 @@ void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, char *str)
xofs= rect->xmax - rect->xmin - BLF_width(str);
/* clip is very strict, so we give it some space */
- if (BLF_type_get() == BLF_FONT_INTERNAL)
- BLF_clipping(rect->xmin-4, rect->ymin-4, rect->xmax+8, rect->ymax+4);
- else
- BLF_clipping(rect->xmin-4, rect->ymin-4, rect->xmax+4, rect->ymax+4);
-
+ BLF_clipping(rect->xmin-4, rect->ymin-4, rect->xmax+4, rect->ymax+4);
BLF_enable(BLF_CLIPPING);
if(fs->shadow)
@@ -240,18 +236,13 @@ void uiStyleInit(void)
font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
}
- if (font->blf_id == -1) {
- /* when all fail, we go back to the internal font. */
- font->blf_id= BLF_load_mem("helv", NULL, 0);
- }
-
if (font->blf_id == -1)
printf("uiStyleInit error, no fonts available\n");
else {
BLF_set(font->blf_id);
/* ? just for speed to initialize?
- * Yes but only if we used the freetype2 library,
- * this build the glyph cache and create the texture.
+ * Yes, this build the glyph cache and create
+ * the texture.
*/
BLF_size(11, U.dpi);
BLF_size(12, U.dpi);
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 3b503f00fd3..6107aa4ccc8 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -49,8 +49,6 @@
#include "ED_screen.h"
-#include "BMF_Api.h"
-
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
@@ -1391,8 +1389,7 @@ static void scroll_printstr(View2DScrollers *scrollers, Scene *scene, float x, f
}
/* draw it */
- glRasterPos2f(x, y);
- BMF_DrawString(G.fonts, str); // XXX check this again when new text-drawing api is done
+ BLF_draw_default(x, y, 0.0f, str);
}
/* local defines for scrollers drawing */
diff --git a/source/blender/editors/mesh/Makefile b/source/blender/editors/mesh/Makefile
index 60b1fa1c329..650771519cd 100644
--- a/source/blender/editors/mesh/Makefile
+++ b/source/blender/editors/mesh/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_ELBEEM)/include
diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript
index e99351e1a70..df1f297698d 100644
--- a/source/blender/editors/mesh/SConscript
+++ b/source/blender/editors/mesh/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu'
+incs += ' #/intern/guardedalloc ../../gpu'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
env.BlenderLib ( 'bf_editors_mesh', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 90b26d0f425..b6e679468e0 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -82,8 +82,6 @@ editmesh_tool.c: UI called tools for editmesh, geometry changes here, otherwise
#include "WM_api.h"
#include "WM_types.h"
-#include "BMF_Api.h"
-
#include "ED_mesh.h"
#include "ED_view3d.h"
#include "ED_util.h"
diff --git a/source/blender/editors/object/Makefile b/source/blender/editors/object/Makefile
index 9011f566bc6..c0312023bfd 100644
--- a/source/blender/editors/object/Makefile
+++ b/source/blender/editors/object/Makefile
@@ -37,7 +37,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../windowmanager
diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript
index 5cd7a3b91af..3371e172a82 100644
--- a/source/blender/editors/object/SConscript
+++ b/source/blender/editors/object/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc'
-incs += ' #/intern/guardedalloc #intern/bmfont'
+incs += ' #/intern/guardedalloc'
incs += ' ../../makesrna ../../python'
defs = []
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index a7e2ce34443..68a2cf04692 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -120,8 +120,6 @@
#include "ED_util.h"
#include "ED_view3d.h"
-#include "BMF_Api.h"
-
#include "BIF_transform.h"
#include "UI_interface.h"
diff --git a/source/blender/editors/physics/Makefile b/source/blender/editors/physics/Makefile
index bd2dbc65f91..a71ea9e2083 100644
--- a/source/blender/editors/physics/Makefile
+++ b/source/blender/editors/physics/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_ELBEEM)/include
diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript
index 241962442d4..5718ae0c217 100644
--- a/source/blender/editors/physics/SConscript
+++ b/source/blender/editors/physics/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu'
+incs += ' #/intern/guardedalloc ../../gpu'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
env.BlenderLib ( 'bf_editors_physics', sources, Split(incs), [], libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/preview/Makefile b/source/blender/editors/preview/Makefile
index 84514d73570..c44da6753f3 100644
--- a/source/blender/editors/preview/Makefile
+++ b/source/blender/editors/preview/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_ELBEEM)/include
diff --git a/source/blender/editors/preview/SConscript b/source/blender/editors/preview/SConscript
index dcc80e8c626..922232822ff 100644
--- a/source/blender/editors/preview/SConscript
+++ b/source/blender/editors/preview/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' #/intern/guardedalloc #intern/bmfont ../../gpu'
+incs += ' #/intern/guardedalloc ../../gpu'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
incs += ' ../../blenloader'
diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt
index 42480f65268..4ed1e59a87f 100644
--- a/source/blender/editors/screen/CMakeLists.txt
+++ b/source/blender/editors/screen/CMakeLists.txt
@@ -33,7 +33,7 @@ SET(INC ../../windowmanager
../../editors/include
../../../../intern/guardedalloc ../../../../intern/memutil
../../blenlib ../../makesdna ../../makesrna ../../blenkernel
- ../../include ../../../../intern/bmfont ../../imbuf
+ ../../include ../../imbuf
../../render/extern/include ../../../../intern/bsp/extern
../../radiosity/extern/include
../../../intern/decimation/extern ../../blenloader
@@ -45,9 +45,7 @@ SET(INC ../../windowmanager
)
IF(WITH_INTERNATIONAL)
- SET(INC ${INC} ../../ftfont)
ADD_DEFINITIONS(-DINTERNATIONAL)
- ADD_DEFINITIONS(-DFTGL_STATIC_LIBRARY)
ENDIF(WITH_INTERNATIONAL)
IF(WITH_OPENEXR)
diff --git a/source/blender/editors/screen/Makefile b/source/blender/editors/screen/Makefile
index d18d15d00d9..cf6e692c304 100644
--- a/source/blender/editors/screen/Makefile
+++ b/source/blender/editors/screen/Makefile
@@ -37,7 +37,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
# not very neat....
CPPFLAGS += -I../../windowmanager
@@ -49,6 +48,7 @@ CPPFLAGS += -I../../makesrna
CPPFLAGS += -I../../imbuf
CPPFLAGS += -I../../python
CPPFLAGS += -I../../render/extern/include
+CPPFLAGS += -I../../blenfont
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
# own include
diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript
index c291533790a..d00c01a040c 100644
--- a/source/blender/editors/screen/SConscript
+++ b/source/blender/editors/screen/SConscript
@@ -6,7 +6,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../blenloader ../../windowmanager ../../python ../../makesrna'
incs += ' ../../render/extern/include'
-incs += ' #/intern/guardedalloc #/extern/glew/include #intern/bmfont'
+incs += ' #/intern/guardedalloc #/extern/glew/include'
defs = ''
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 9956b8eabcb..6b7b7a914f4 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -50,13 +50,12 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "BLF_api.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "BMF_Api.h"
-
#ifndef DISABLE_PYTHON
#include "BPY_extern.h"
#endif
@@ -270,8 +269,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
UI_ThemeColor(TH_TEXT);
- glRasterPos2i(20, 6);
- BMF_DrawString(G.font, ar->headerstr);
+ BLF_draw_default(20, 6, 0.0f, ar->headerstr);
}
else if(at->draw) {
at->draw(C, ar);
diff --git a/source/blender/editors/sculpt_paint/Makefile b/source/blender/editors/sculpt_paint/Makefile
index e810f7efbe4..9353116a4bc 100644
--- a/source/blender/editors/sculpt_paint/Makefile
+++ b/source/blender/editors/sculpt_paint/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_ELBEEM)/include
diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript
index 3e00453e049..01e1d80c24c 100644
--- a/source/blender/editors/sculpt_paint/SConscript
+++ b/source/blender/editors/sculpt_paint/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont'
+incs += ' ../../render/extern/include #/intern/guardedalloc'
incs += ' ../../gpu ../../makesrna'
env.BlenderLib ( 'bf_editors_sculpt_paint', sources, Split(incs), [], libtype=['core'], priority=[40] )
diff --git a/source/blender/editors/space_file/Makefile b/source/blender/editors/space_file/Makefile
index 480a4ee3889..c8f2af9c2e8 100644
--- a/source/blender/editors/space_file/Makefile
+++ b/source/blender/editors/space_file/Makefile
@@ -37,7 +37,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
# not very neat....
CPPFLAGS += -I../../windowmanager
diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript
index 8302d6eecef..699b988f50f 100644
--- a/source/blender/editors/space_file/SConscript
+++ b/source/blender/editors/space_file/SConscript
@@ -4,7 +4,7 @@ Import ('env')
sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
-incs += ' ../../blenloader #intern/bmfont ../../makesrna'
+incs += ' ../../blenloader ../../makesrna'
incs += ' ../../render/extern/include '
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 84e0f264275..dafb254f4bc 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -37,7 +37,6 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "BMF_Api.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/space_node/Makefile b/source/blender/editors/space_node/Makefile
index 233572dbfb1..60f81255a74 100644
--- a/source/blender/editors/space_node/Makefile
+++ b/source/blender/editors/space_node/Makefile
@@ -37,7 +37,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
# not very neat....
CPPFLAGS += -I../../windowmanager
diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript
index babd8dc9080..ad57970950d 100644
--- a/source/blender/editors/space_node/SConscript
+++ b/source/blender/editors/space_node/SConscript
@@ -4,7 +4,7 @@ Import ('env')
sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
-incs += ' ../../nodes #intern/bmfont ../../render/extern/include'
+incs += ' ../../nodes ../../render/extern/include'
incs += ' ../../windowmanager #intern/guardedalloc #extern/glew/include'
defs = []
cf = []
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 25693009bf2..9c2cf5dc5dd 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -71,8 +71,6 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "BMF_Api.h"
-
#include "MEM_guardedalloc.h"
#include "ED_node.h"
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index ab6d3c245f1..0670dd9e01f 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -68,7 +68,6 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "BMF_Api.h"
#include "WM_api.h"
#include "WM_types.h"
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index ae986d71258..7104fad1767 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -3988,6 +3988,9 @@ static void outliner_draw_tree(Scene *scene, ARegion *ar, SpaceOops *soops)
float col[4];
#if 0 // XXX was #ifdef INTERNATIONAL
+ /* Maybe the INTERNATIONAL was really for check about freetype2 ?
+ * anyway I think that we can remove this now - Diego
+ */
FTF_SetFontSize('l');
BIF_SetScale(1.0);
#endif
diff --git a/source/blender/editors/space_sequencer/Makefile b/source/blender/editors/space_sequencer/Makefile
index c04202cba73..80699db4baa 100644
--- a/source/blender/editors/space_sequencer/Makefile
+++ b/source/blender/editors/space_sequencer/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
# not very neat....
CPPFLAGS += -I../../windowmanager
@@ -49,6 +48,7 @@ CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../makesrna
CPPFLAGS += -I../../imbuf
CPPFLAGS += -I../../python
+CPPFLAGS += -I../../blenfont
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
# own include
diff --git a/source/blender/editors/space_sequencer/SConscript b/source/blender/editors/space_sequencer/SConscript
index 1794ef29257..8a8c4963003 100644
--- a/source/blender/editors/space_sequencer/SConscript
+++ b/source/blender/editors/space_sequencer/SConscript
@@ -5,6 +5,6 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' #intern/bmfont ../../makesrna'
+incs += ' ../../makesrna'
env.BlenderLib ( 'bf_editors_space_sequencer', sources, Split(incs), [], libtype=['core'], priority=[100] )
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index e71abec8e4b..5e07689f536 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -30,8 +30,6 @@
#include "MEM_guardedalloc.h"
-#include "BMF_Api.h"
-
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
@@ -57,6 +55,7 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "BLF_api.h"
#include "ED_anim_api.h"
#include "ED_space_api.h"
@@ -404,12 +403,14 @@ static void draw_seq_handle(SpaceSeq *sseq, Sequence *seq, float pixelx, short d
cpack(0xFFFFFF);
if (direction == SEQ_LEFTHANDLE) {
sprintf(str, "%d", seq->startdisp);
- glRasterPos3f(rx1, y1-0.15, 0.0);
+ x1= rx1;
+ y1 -= 0.15;
} else {
sprintf(str, "%d", seq->enddisp - 1);
- glRasterPos3f((x2-BMF_GetStringWidth(G.fonts, str)*pixelx), y2+0.05, 0.0);
+ x1= x2 - BLF_width_default(str) * pixelx;
+ y1= y2 + 0.05;
}
- BMF_DrawString(G.fonts, str);
+ BLF_draw_default(x1, y1, 0.0f, str);
}
}
@@ -572,8 +573,9 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
}
strp= str;
-
- while( (len= BMF_GetStringWidth(G.font, strp)) > size) {
+ // XXX
+ /* The correct thing is used a Styla and set the clipping region. */
+ while( (len= BLF_width_default(strp)) > size) {
if(len < 10) break;
if(strp[1]==0) break;
strp++;
@@ -590,8 +592,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
}else{
cpack(0);
}
- glRasterPos3f(x1, y1+SEQ_STRIP_OFSBOTTOM, 0.0);
- BMF_DrawString(G.font, strp);
+ BLF_draw_default(x1, y1+SEQ_STRIP_OFSBOTTOM, 0.0, strp);
}
/* draws a shaded strip, made from gradient + flat color + gradient */
diff --git a/source/blender/editors/space_text/SConscript b/source/blender/editors/space_text/SConscript
index 3d5ccc318e1..09ba961bfce 100644
--- a/source/blender/editors/space_text/SConscript
+++ b/source/blender/editors/space_text/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
defs = []
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' #/intern/bmfont ../../python ../../makesrna ../../blenfont'
+incs += ' ../../python ../../makesrna ../../blenfont'
if not env['WITH_BF_PYTHON']:
defs.append('DISABLE_PYTHON')
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index 50109ba8c42..259811aee0f 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -33,7 +33,6 @@
struct ARegion;
struct ARegionType;
struct bContext;
-struct BMF_Font;
struct ReportList;
struct ScrArea;
struct SpaceText;
diff --git a/source/blender/editors/space_view3d/Makefile b/source/blender/editors/space_view3d/Makefile
index 442ab502e65..dd4eab89411 100644
--- a/source/blender/editors/space_view3d/Makefile
+++ b/source/blender/editors/space_view3d/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
# not very neat....
CPPFLAGS += -I../../windowmanager
@@ -51,6 +50,7 @@ CPPFLAGS += -I../../python
CPPFLAGS += -I../../gpu
CPPFLAGS += -I../../makesrna
CPPFLAGS += -I../../render/extern/include
+CPPFLAGS += -I../../blenfont
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
# own include
diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript
index c9b29f61e44..b771095c781 100644
--- a/source/blender/editors/space_view3d/SConscript
+++ b/source/blender/editors/space_view3d/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont'
-incs += ' ../../gpu ../../makesrna'
+incs += ' ../../render/extern/include #/intern/guardedalloc'
+incs += ' ../../gpu ../../makesrna ../../blenfont'
env.BlenderLib ( 'bf_editors_space_view3d', sources, Split(incs), [], libtype=['core'], priority=[40] )
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 5d130cee48d..dfdd70b11e7 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -37,8 +37,6 @@
#include "MEM_guardedalloc.h"
-#include "BMF_Api.h"
-
#include "DNA_action_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
@@ -74,6 +72,7 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "BLF_api.h"
#include "UI_resources.h"
@@ -1806,9 +1805,8 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba
/* Draw names of bone */
if (arm->flag & ARM_DRAWNAMES) {
VecMidf(vec, pchan->pose_head, pchan->pose_tail);
- glRasterPos3fv(vec);
- BMF_DrawString(G.font, " ");
- BMF_DrawString(G.font, pchan->name);
+ BLF_draw_default(vec[0], vec[1], vec[2], " ");
+ BLF_draw_default(vec[0] + BLF_width_default(" "), vec[1], vec[2], pchan->name);
}
/* Draw additional axes on the bone tail */
@@ -1993,8 +1991,8 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt)
if (arm->flag & ARM_DRAWNAMES) {
VecMidf(vec, eBone->head, eBone->tail);
glRasterPos3fv(vec);
- BMF_DrawString(G.font, " ");
- BMF_DrawString(G.font, eBone->name);
+ BLF_draw_default(vec[0], vec[1], vec[2], " ");
+ BLF_draw_default(vec[0] + BLF_width_default(" "), vec[1], vec[2], eBone->name);
}
/* Draw additional axes */
if (arm->flag & ARM_DRAWAXES) {
@@ -2155,15 +2153,13 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
/* only draw framenum if several consecutive highlighted points don't occur on same point */
if (a == 0) {
- glRasterPos3fv(fp);
sprintf(str, " %d\n", (a+sfra));
- BMF_DrawString(G.font, str);
+ BLF_draw_default(fp[0], fp[1], fp[2], str);
}
else if ((a > stepsize) && (a < len-stepsize)) {
if ((VecEqual(fp, fp-(stepsize*3))==0) || (VecEqual(fp, fp+(stepsize*3))==0)) {
- glRasterPos3fv(fp);
sprintf(str, " %d\n", (a+sfra));
- BMF_DrawString(G.font, str);
+ BLF_draw_default(fp[0], fp[1], fp[2], str);
}
}
}
@@ -2205,9 +2201,8 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
if (ak->cfra == (a+sfra)) {
char str[32];
- glRasterPos3fv(fp);
sprintf(str, " %d\n", (a+sfra));
- BMF_DrawString(G.font, str);
+ BLF_draw_default(fp[0], fp[1], fp[2], str);
}
}
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 10edd4eccb5..3725fc24b6c 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -34,8 +34,6 @@
#include "MEM_guardedalloc.h"
-#include "BMF_Api.h"
-
#include "IMB_imbuf.h"
@@ -107,6 +105,7 @@
#include "UI_interface_icons.h"
#include "WM_api.h"
+#include "BLF_api.h"
#include "view3d_intern.h" // own include
@@ -361,16 +360,15 @@ void drawaxes(float size, int flag, char drawtype)
glEnd();
v2[axis]+= size*0.125;
- glRasterPos3fv(v2);
// patch for 3d cards crashing on glSelect for text drawing (IBM)
if((flag & DRAW_PICKING) == 0) {
if (axis==0)
- BMF_DrawString(G.font, "x");
+ BLF_draw_default(v2[0], v2[1], v2[2], "x");
else if (axis==1)
- BMF_DrawString(G.font, "y");
+ BLF_draw_default(v2[0], v2[1], v2[2], "y");
else
- BMF_DrawString(G.font, "z");
+ BLF_draw_default(v2[0], v2[1], v2[2], "z");
}
}
break;
@@ -1778,7 +1776,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
Mesh *me= ob->data;
EditEdge *eed;
EditFace *efa;
- float v1[3], v2[3], v3[3], v4[3];
+ float v1[3], v2[3], v3[3], v4[3], x, y, z;
float fvec[3];
char val[32]; /* Stores the measurement display text here */
char conv_float[5]; /* Use a float conversion matching the grid size */
@@ -1818,7 +1816,9 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
VECCOPY(v1, eed->v1->co);
VECCOPY(v2, eed->v2->co);
- glRasterPos3f( 0.5*(v1[0]+v2[0]), 0.5*(v1[1]+v2[1]), 0.5*(v1[2]+v2[2]));
+ x= 0.5*(v1[0]+v2[0]);
+ y= 0.5*(v1[1]+v2[1]);
+ z= 0.5*(v1[2]+v2[2]);
if(v3d->flag & V3D_GLOBAL_STATS) {
Mat4MulVecfl(ob->obmat, v1);
@@ -1826,7 +1826,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
}
sprintf(val, conv_float, VecLenf(v1, v2));
- BMF_DrawString( G.fonts, val);
+ BLF_draw_default(x, y, z, val);
}
}
}
@@ -1861,8 +1861,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
area = AreaT3Dfl(v1, v2, v3);
sprintf(val, conv_float, area);
- glRasterPos3fv(efa->cent);
- BMF_DrawString( G.fonts, val);
+ BLF_draw_default(efa->cent[0], efa->cent[1], efa->cent[2], val);
}
}
}
@@ -1904,15 +1903,13 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
/* Vec 1 */
sprintf(val,"%.3f", VecAngle3(v4, v1, v2));
VecLerpf(fvec, efa->cent, efa->v1->co, 0.8);
- glRasterPos3fv(fvec);
- BMF_DrawString( G.fonts, val);
+ BLF_draw_default(efa->cent[0], efa->cent[1], efa->cent[2], val);
}
if( (e1->f & e2->f & SELECT) || (G.moving && (efa->v2->f & SELECT)) ) {
/* Vec 2 */
sprintf(val,"%.3f", VecAngle3(v1, v2, v3));
VecLerpf(fvec, efa->cent, efa->v2->co, 0.8);
- glRasterPos3fv(fvec);
- BMF_DrawString( G.fonts, val);
+ BLF_draw_default(fvec[0], fvec[1], fvec[2], val);
}
if( (e2->f & e3->f & SELECT) || (G.moving && (efa->v3->f & SELECT)) ) {
/* Vec 3 */
@@ -1921,16 +1918,14 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
else
sprintf(val,"%.3f", VecAngle3(v2, v3, v1));
VecLerpf(fvec, efa->cent, efa->v3->co, 0.8);
- glRasterPos3fv(fvec);
- BMF_DrawString( G.fonts, val);
+ BLF_draw_default(fvec[0], fvec[1], fvec[2], val);
}
/* Vec 4 */
if(efa->v4) {
if( (e3->f & e4->f & SELECT) || (G.moving && (efa->v4->f & SELECT)) ) {
sprintf(val,"%.3f", VecAngle3(v3, v4, v1));
VecLerpf(fvec, efa->cent, efa->v4->co, 0.8);
- glRasterPos3fv(fvec);
- BMF_DrawString( G.fonts, val);
+ BLF_draw_default(fvec[0], fvec[1], fvec[2], val);
}
}
}
@@ -3257,9 +3252,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(part->draw&PART_DRAW_NUM && !(G.f & G_RENDER_SHADOW)){
/* in path drawing state.co is the end point */
- glRasterPos3f(state.co[0], state.co[1], state.co[2]);
sprintf(val," %i",a);
- BMF_DrawString(G.font, val);
+ BLF_draw_default(state.co[0], state.co[1], state.co[2], val);
}
}
}
@@ -3574,9 +3568,8 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob
for(k=0, key=edit->keys[i]+k; k<pa->totkey; k++, key++){
if(key->flag & PEK_HIDE) continue;
- glRasterPos3fv(key->world_co);
sprintf(val," %.1f",*key->time);
- BMF_DrawString(G.font, val);
+ BLF_draw_default(key->world_co[0], key->world_co[1], key->world_co[2], val);
}
}
}
@@ -3598,9 +3591,8 @@ static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ob
glEnd();
if((pset->flag & PE_SHOW_TIME) && !(G.f & G_RENDER_SHADOW)){
- glRasterPos3fv(key->world_co);
sprintf(val," %.1f",*key->time);
- BMF_DrawString(G.font, val);
+ BLF_draw_default(key->world_co[0], key->world_co[1], key->world_co[2], val);
}
}
}
@@ -4625,13 +4617,12 @@ void drawRBpivot(bRigidBodyJointConstraint *data)
glVertex3fv(v1);
glVertex3fv(v);
glEnd();
- glRasterPos3fv(v);
if (axis==0)
- BMF_DrawString(G.font, "px");
+ BLF_draw_default(v[0], v[1], v[2], "px");
else if (axis==1)
- BMF_DrawString(G.font, "py");
+ BLF_draw_default(v[0], v[1], v[2], "py");
else
- BMF_DrawString(G.font, "pz");
+ BLF_draw_default(v[0], v[1], v[2], "pz");
}
glLineWidth (1.0f);
setlinestyle(0);
@@ -5051,10 +5042,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* but, we also dont draw names for sets or duplicators */
if(flag == 0) {
if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
- glRasterPos3f(0.0, 0.0, 0.0);
-
- BMF_DrawString(G.font, " ");
- BMF_DrawString(G.font, ob->id.name+2);
+ BLF_draw_default(0.0, 0.0, 0.0, " ");
+ BLF_draw_default(0.0 + BLF_width_default(" "), 0.0, 0.0, ob->id.name+2);
if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
}
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index cb67a1fc9aa..bbf0279692a 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -69,9 +69,9 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "BMF_Api.h"
#include "WM_api.h"
+#include "BLF_api.h"
#include "ED_armature.h"
#include "ED_keyframing.h"
@@ -558,8 +558,7 @@ static void draw_view_axis(RegionView3D *rv3d)
dy = vec[1] * k;
fdrawline(start, start + ydisp, start + dx, start + dy + ydisp);
if (fabs(dx) > toll || fabs(dy) > toll) {
- glRasterPos2i(start + dx + 2, start + dy + ydisp + 2);
- BMF_DrawString(G.fonts, "x");
+ BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "x");
}
/* Y */
@@ -579,8 +578,7 @@ static void draw_view_axis(RegionView3D *rv3d)
dy = vec[1] * k;
fdrawline(start, start + ydisp, start + dx, start + dy + ydisp);
if (fabs(dx) > toll || fabs(dy) > toll) {
- glRasterPos2i(start + dx + 2, start + dy + ydisp + 2);
- BMF_DrawString(G.fonts, "y");
+ BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "y");
}
/* Z */
@@ -600,8 +598,7 @@ static void draw_view_axis(RegionView3D *rv3d)
dy = vec[1] * k;
fdrawline(start, start + ydisp, start + dx, start + dy + ydisp);
if (fabs(dx) > toll || fabs(dy) > toll) {
- glRasterPos2i(start + dx + 2, start + dy + ydisp + 2);
- BMF_DrawString(G.fonts, "z");
+ BLF_draw_default(start + dx + 2, start + dy + ydisp + 2, 0.0f, "z");
}
/* restore line-width */
@@ -693,8 +690,7 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d)
if (printable) {
UI_ThemeColor(TH_TEXT_HI);
- glRasterPos2i(10, ar->winy-20);
- BMF_DrawString(G.fonts, printable);
+ BLF_draw_default(10, ar->winy-20, 0.0f, printable);
}
if (v3d->localview) {
@@ -799,7 +795,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d)
}
/* colour depends on whether there is a keyframe */
- if (id_frame_has_keyframe((ID *)ob, /*frame_to_float(scene, CFRA)*/(float)(CFRA), v3d->keyflags))
+ if (id_frame_has_keyframe((ID *)ob, /*frame_to_float(scene, CFRA)*/(float)(CFRA), v3d->keyflags))
UI_ThemeColor(TH_VERTEX_SELECT);
else
UI_ThemeColor(TH_TEXT_HI);
@@ -817,9 +813,8 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d)
if (U.uiflag & USER_SHOW_ROTVIEWICON)
offset = 14 + (U.rvisize * 2);
-
- glRasterPos2i(offset, 10);
- BMF_DrawString(G.fonts, info);
+
+ BLF_draw_default(offset, 10, 0.0f, info);
}
static void view3d_get_viewborder_size(Scene *scene, ARegion *ar, float size_r[2])
@@ -999,9 +994,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
/* camera name - draw in highlighted text color */
if (ca && (ca->flag & CAM_SHOWNAME)) {
UI_ThemeColor(TH_TEXT_HI);
- glRasterPos2f(x1, y1-15);
-
- BMF_DrawString(G.font, v3d->camera->id.name+2);
+ BLF_draw_default(x1, y1-15, 0.0f, v3d->camera->id.name+2);
UI_ThemeColor(TH_WIRE);
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index fba8e0c4eb7..24d211d81ab 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -92,8 +92,6 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "BMF_Api.h"
-
#include "view3d_intern.h"
diff --git a/source/blender/editors/transform/Makefile b/source/blender/editors/transform/Makefile
index 36758190b52..bc3e08a2ae8 100644
--- a/source/blender/editors/transform/Makefile
+++ b/source/blender/editors/transform/Makefile
@@ -38,7 +38,6 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_BMFONT)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../windowmanager
diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript
index 2c44204afa9..b2dee8c3358 100644
--- a/source/blender/editors/transform/SConscript
+++ b/source/blender/editors/transform/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' ../../render/extern/include #/intern/guardedalloc #intern/bmfont'
+incs += ' ../../render/extern/include #/intern/guardedalloc'
incs += ' ../../gpu ../../makesrna'
env.BlenderLib ( 'bf_editors_transform', sources, Split(incs), [], libtype=['core'], priority=[40] ) \ No newline at end of file