From 7c5181efd97e6691792dc66ed1108dda8c095d18 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Tue, 12 Oct 2021 22:42:08 -0500 Subject: [PATCH] paint in bindings --- bindings/bindings.nim | 1 + src/pixie/fonts.nim | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/bindings.nim b/bindings/bindings.nim index e161604..9a120e9 100644 --- a/bindings/bindings.nim +++ b/bindings/bindings.nim @@ -224,6 +224,7 @@ exportRefObject Font: size lineHeight paints + paint textCase underline strikethrough diff --git a/src/pixie/fonts.nim b/src/pixie/fonts.nim index 0b42065..50eb308 100644 --- a/src/pixie/fonts.nim +++ b/src/pixie/fonts.nim @@ -183,7 +183,7 @@ proc defaultLineHeight*(font: Font): float32 {.inline, raises: [].} = font.typeface.ascent - font.typeface.descent + font.typeface.lineGap round(fontUnits * font.scale) -proc paint*(font: Font): var Paint {.inline, raises: [].} = +proc paint*(font: Font): Paint {.inline, raises: [].} = font.paints[0] proc `paint=`*(font: Font, paint: Paint) {.inline, raises: [].} =