mirror of https://github.com/odrling/Aegisub
fix linux extent getting screwups
Originally committed to SVN as r889.
This commit is contained in:
parent
3c46ab72ac
commit
4247fa0ceb
|
@ -147,14 +147,16 @@ namespace Automation4 {
|
|||
for (unsigned int i = 0; i < text.length(); i++) {
|
||||
int a, b, c, d;
|
||||
thedc.GetTextExtent(text[i], &a, &b, &c, &d);
|
||||
width += a + >spacing;
|
||||
width += a + spacing;
|
||||
height = b > height ? b : height;
|
||||
descent = c > descent ? c : descent;
|
||||
extlead= d > extlead ? d : extlead;
|
||||
}
|
||||
} else {
|
||||
// If the inter-character spacing should be zero, kerning info can (and must) be used, so calculate everything in one go
|
||||
thedc.GetTextExtent(text, &width, &height, &descent, &extlead);
|
||||
long lwidth, lheight, ldescent, lextlead;
|
||||
thedc.GetTextExtent(text, &lwidth, &lheight, &ldescent, &lextlead);
|
||||
width = lwidth; height = lheight; descent = ldescent; extlead = lextlead;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#include <stdwx.h>
|
||||
|
||||
typedef int64_t __int64;
|
||||
typedef uint64_t __uint64;
|
||||
#define abs64 llabs
|
||||
|
|
Loading…
Reference in New Issue