mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2023-10-10 13:37:41 +02:00
Fixed issue #31
This commit is contained in:
parent
1b7bfd2087
commit
b1a642e64a
@ -284,7 +284,7 @@ cOglGlyph::~cOglGlyph(void) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int cOglGlyph::GetKerningCache(uint prevSym) {
|
int cOglGlyph::GetKerningCache(FT_ULong prevSym) {
|
||||||
for (int i = kerningCache.Size(); --i > 0; ) {
|
for (int i = kerningCache.Size(); --i > 0; ) {
|
||||||
if (kerningCache[i].prevSym == prevSym)
|
if (kerningCache[i].prevSym == prevSym)
|
||||||
return kerningCache[i].kerning;
|
return kerningCache[i].kerning;
|
||||||
@ -292,7 +292,7 @@ int cOglGlyph::GetKerningCache(uint prevSym) {
|
|||||||
return KERNING_UNKNOWN;
|
return KERNING_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cOglGlyph::SetKerningCache(uint prevSym, int kerning) {
|
void cOglGlyph::SetKerningCache(FT_ULong prevSym, int kerning) {
|
||||||
kerningCache.Append(tKerning(prevSym, kerning));
|
kerningCache.Append(tKerning(prevSym, kerning));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ cOglGlyph* cOglFont::Glyph(FT_ULong charCode) const {
|
|||||||
return Glyph;
|
return Glyph;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cOglFont::Kerning(cOglGlyph *glyph, uint prevSym) const {
|
int cOglFont::Kerning(cOglGlyph *glyph, FT_ULong prevSym) const {
|
||||||
int kerning = 0;
|
int kerning = 0;
|
||||||
if (glyph && prevSym) {
|
if (glyph && prevSym) {
|
||||||
kerning = glyph->GetKerningCache(prevSym);
|
kerning = glyph->GetKerningCache(prevSym);
|
||||||
@ -826,7 +826,7 @@ cOglCmdCopyBufferToOutputFb::cOglCmdCopyBufferToOutputFb(cOglFb *fb, cOglOutputF
|
|||||||
extern unsigned char *posd;
|
extern unsigned char *posd;
|
||||||
|
|
||||||
bool cOglCmdCopyBufferToOutputFb::Execute(void) {
|
bool cOglCmdCopyBufferToOutputFb::Execute(void) {
|
||||||
int i;
|
|
||||||
pthread_mutex_lock(&OSDMutex);
|
pthread_mutex_lock(&OSDMutex);
|
||||||
fb->BindRead();
|
fb->BindRead();
|
||||||
oFb->BindWrite();
|
oFb->BindWrite();
|
||||||
@ -1195,15 +1195,15 @@ bool cOglCmdDrawText::Execute(void) {
|
|||||||
int xGlyph = x;
|
int xGlyph = x;
|
||||||
int fontHeight = f->Height();
|
int fontHeight = f->Height();
|
||||||
int bottom = f->Bottom();
|
int bottom = f->Bottom();
|
||||||
uint sym = 0;
|
FT_ULong sym = 0;
|
||||||
uint prevSym = 0;
|
FT_ULong prevSym = 0;
|
||||||
int kerning = 0;
|
int kerning = 0;
|
||||||
|
|
||||||
for (int i = 0; symbols[i]; i++) {
|
for (int i = 0; symbols[i]; i++) {
|
||||||
sym = symbols[i];
|
sym = symbols[i];
|
||||||
cOglGlyph *g = f->Glyph(sym);
|
cOglGlyph *g = f->Glyph(sym);
|
||||||
if (!g) {
|
if (!g) {
|
||||||
esyslog("[softhddev]ERROR: could not load glyph %x", sym);
|
esyslog("[softhddev]ERROR: could not load glyph %lx", sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( limitX && xGlyph + g->AdvanceX() > limitX ) {
|
if ( limitX && xGlyph + g->AdvanceX() > limitX ) {
|
||||||
|
10
openglosd.h
10
openglosd.h
@ -103,11 +103,11 @@ class cOglGlyph:public cListObject
|
|||||||
struct tKerning
|
struct tKerning
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tKerning(uint prevSym, GLfloat kerning = 0.0f) {
|
tKerning(FT_ULong prevSym, GLfloat kerning = 0.0f) {
|
||||||
this->prevSym = prevSym;
|
this->prevSym = prevSym;
|
||||||
this->kerning = kerning;
|
this->kerning = kerning;
|
||||||
}
|
}
|
||||||
uint prevSym;
|
FT_ULong prevSym;
|
||||||
GLfloat kerning;
|
GLfloat kerning;
|
||||||
};
|
};
|
||||||
FT_ULong charCode;
|
FT_ULong charCode;
|
||||||
@ -148,8 +148,8 @@ class cOglGlyph:public cListObject
|
|||||||
{
|
{
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
int GetKerningCache(uint prevSym);
|
int GetKerningCache(FT_ULong prevSym);
|
||||||
void SetKerningCache(uint prevSym, int kerning);
|
void SetKerningCache(FT_ULong prevSym, int kerning);
|
||||||
void BindTexture(void);
|
void BindTexture(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ class cOglFont:public cListObject
|
|||||||
return height;
|
return height;
|
||||||
};
|
};
|
||||||
cOglGlyph *Glyph(FT_ULong charCode) const;
|
cOglGlyph *Glyph(FT_ULong charCode) const;
|
||||||
int Kerning(cOglGlyph * glyph, uint prevSym) const;
|
int Kerning(cOglGlyph * glyph, FT_ULong prevSym) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user