mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
fontrenderer.cpp: Use additional percentage height offset.
Different font types could have different glyph heights,
Therfore static values seems not really senseful.
eg. chars like ÄÁÂÅÈÉÊËÌÍÎÏÑÒÓÕÖÙÛÜÝ could paint over defined height,
Note: However, depending of implementations, the font image may change.
Most likely this must be adapted to some parts.
Origin commit data
------------------
Commit: 3ecb94fc21
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-01 (Sun, 01 Jan 2017)
This commit is contained in:
@@ -287,10 +287,14 @@ return 0;
|
||||
ascender=tM;
|
||||
descender=tg-hg; //this is a negative value!
|
||||
int halflinegap= -(descender>>1); // |descender/2| - we use descender as linegap, half at top, half at bottom
|
||||
upper = halflinegap+ascender+3; // we add 3 at top
|
||||
lower = -descender+halflinegap+1; // we add 1 at bottom
|
||||
|
||||
//hack: Use additional percentage height offset, font types could have different heights, static values seems not really senseful.
|
||||
upper = halflinegap+ascender+hg/7; // we add 1/7 of glyph height at top
|
||||
lower = -descender+halflinegap-hg/10; // we add 1/10 of glyph height at bottom
|
||||
|
||||
height=upper+lower; // this is total height == distance of lines
|
||||
DigitHeight = ascender+2;
|
||||
|
||||
DigitHeight = ascender+2; //Is this static value really ok?
|
||||
DigitOffset = -descender+halflinegap;
|
||||
// hack end
|
||||
|
||||
|
Reference in New Issue
Block a user