mirror of https://github.com/buggins/dlangui.git
fixes
This commit is contained in:
parent
fbe9ef75fb
commit
912961b48e
|
@ -254,6 +254,7 @@ private class FreeTypeFontFile {
|
|||
glyph.originX = cast(byte)(_slot.metrics.horiBearingX >> 6);
|
||||
glyph.originY = cast(byte)(_slot.metrics.horiBearingY >> 6);
|
||||
glyph.width = cast(ubyte)(myabs(cast(int)(_slot.metrics.horiAdvance)) >> 6);
|
||||
glyph.glyphIndex = cast(ushort)code;
|
||||
if (withImage) {
|
||||
FT_Bitmap* bitmap = &_slot.bitmap;
|
||||
ubyte w = cast(ubyte)(bitmap.width);
|
||||
|
|
|
@ -34,13 +34,12 @@ class TextWidget : Widget {
|
|||
|
||||
override void measure(int parentWidth, int parentHeight) {
|
||||
FontRef font = font();
|
||||
auto measureStart = std.datetime.Clock.currAppTick;
|
||||
//auto measureStart = std.datetime.Clock.currAppTick;
|
||||
Point sz = font.textSize(text);
|
||||
auto measureEnd = std.datetime.Clock.currAppTick;
|
||||
auto duration = measureEnd - measureStart;
|
||||
//if (duration > 10000)
|
||||
if (duration.length > 10)
|
||||
Log.d("TextWidget measureText took ", duration.length, " ticks");
|
||||
//auto measureEnd = std.datetime.Clock.currAppTick;
|
||||
//auto duration = measureEnd - measureStart;
|
||||
//if (duration.length > 10)
|
||||
// Log.d("TextWidget measureText took ", duration.length, " ticks");
|
||||
measuredContent(parentWidth, parentHeight, sz.x, sz.y);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue