git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
copy lists, not list identities... should fix saving of non-default values
[enigma2.git]
/
lib
/
gdi
/
font.cpp
diff --git
a/lib/gdi/font.cpp
b/lib/gdi/font.cpp
index 1471aa5ef6e82435c6bdcd3f15f9ee8c72b0b017..4c08b4fcf4e9742f13835888da2150482435d2cd 100644
(file)
--- a/
lib/gdi/font.cpp
+++ b/
lib/gdi/font.cpp
@@
-18,7
+18,7
@@
#include <lib/base/init.h>
#include <lib/base/init_num.h>
#include <lib/base/init.h>
#include <lib/base/init_num.h>
-
//
#define HAVE_FRIBIDI
+#define HAVE_FRIBIDI
// until we have it in the cdk
#ifdef HAVE_FRIBIDI
// until we have it in the cdk
#ifdef HAVE_FRIBIDI
@@
-205,12
+205,10
@@
float fontRenderClass::getLineHeight(const gFont& font)
return 0;
}
int linegap=current_face->size->metrics.height-(current_face->size->metrics.ascender+current_face->size->metrics.descender);
return 0;
}
int linegap=current_face->size->metrics.height-(current_face->size->metrics.ascender+current_face->size->metrics.descender);
- float height=(current_face->size->metrics.ascender+current_face->size->metrics.descender+linegap/2.0)/64;
- delete fnt;
+ float height=(current_face->size->metrics.ascender+current_face->size->metrics.descender+linegap)/64.0;
return height;
}
return height;
}
-
fontRenderClass::~fontRenderClass()
{
singleLock s(ftlock);
fontRenderClass::~fontRenderClass()
{
singleLock s(ftlock);
@@
-363,7
+361,7
@@
void eTextPara::calc_bbox()
boundBox = i->bbox;
++i;
boundBox = i->bbox;
++i;
- for (
i
; i != glyphs.end(); ++i)
+ for (; i != glyphs.end(); ++i)
{
if ( i->flags & GS_ISSPACE )
continue;
{
if ( i->flags & GS_ISSPACE )
continue;
@@
-386,7
+384,7
@@
void eTextPara::newLine(int flags)
cursor.setX(left);
previous=0;
int linegap=current_face->size->metrics.height-(current_face->size->metrics.ascender+current_face->size->metrics.descender);
cursor.setX(left);
previous=0;
int linegap=current_face->size->metrics.height-(current_face->size->metrics.ascender+current_face->size->metrics.descender);
- cursor+=ePoint(0, (current_face->size->metrics.ascender+current_face->size->metrics.descender+linegap
*1/2
)>>6);
+ cursor+=ePoint(0, (current_face->size->metrics.ascender+current_face->size->metrics.descender+linegap)>>6);
if (maximum.height()<cursor.y())
maximum.setHeight(cursor.y());
previous=0;
if (maximum.height()<cursor.y())
maximum.setHeight(cursor.y());
previous=0;
@@
-408,6
+406,7
@@
void eTextPara::setFont(const gFont *font)
}
std::string eTextPara::replacement_facename;
}
std::string eTextPara::replacement_facename;
+std::set<int> eTextPara::forced_replaces;
void eTextPara::setFont(Font *fnt, Font *replacement)
{
void eTextPara::setFont(Font *fnt, Font *replacement)
{
@@
-589,9
+588,10
@@
nprint: isprintable=0;
}
if (isprintable)
{
}
if (isprintable)
{
- FT_UInt index;
-
- index=(rflags&RS_DIRECT)? *i : FT_Get_Char_Index(current_face, *i);
+ FT_UInt index = 0;
+
+ if (forced_replaces.find(*i) == forced_replaces.end())
+ index=(rflags&RS_DIRECT)? *i : FT_Get_Char_Index(current_face, *i);
if (!index)
{
if (!index)
{