From 623bf52bbe029451bec641c956ebb7dab5b1bac0 Mon Sep 17 00:00:00 2001 From: Yatao Li Date: Sun, 22 Sep 2019 12:53:38 +0800 Subject: [PATCH] fix #70 --- states.fs | 4 +++- ui.fs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/states.fs b/states.fs index cd6cf2e..e30cab7 100644 --- a/states.fs +++ b/states.fs @@ -168,7 +168,9 @@ let parseLineHeightOption (v: obj) = elif v.ToLowerInvariant() = "default" then Some Default else - Some(Absolute(float v)) + let v = float v + if v > 0.0 then Some(Absolute v) + else None | _ -> None let Shutdown code = _appLifetime.Shutdown code diff --git a/ui.fs b/ui.fs index fd22284..f6f6e92 100644 --- a/ui.fs +++ b/ui.fs @@ -300,6 +300,7 @@ module ui = | States.Default -> float paint.FontSpacing | States.Add h' -> (float paint.FontSpacing) + h' let h' = round(h'' * scaling) / scaling + let h' = max h' 1.0 // calculate score let score' =