improve A (add space for other fonts to have tail, make the width a little narrower), and create new directory for fonts

This commit is contained in:
2024-08-30 22:01:24 +01:00
parent 42c4b92105
commit 2d6ee874af
6 changed files with 59 additions and 59 deletions

6
a.dsc
View File

@@ -1,6 +0,0 @@
x 0.449999958277 y ~0.349999964237 x ~0.350000023842 y ~0.0500000528991 x 0.349999964237 y ~0.0500000528991
x ~0.350000023842 y ~0.0500000528991 x ~0.450000017881 y ~0.349999964237 x 0.449999958277 y ~0.349999964237
x ~0.10000000149 y 1 x 0.20000000298 y 1 x 1 y ~1
x 1 y ~1 x 0.699999988079 y ~1 x ~0.10000000149 y 1
x 0.10000000149 y 1 x ~0.20000000298 y 1 x ~1 y ~1
x ~1 y ~1 x ~0.699999988079 y ~1 x 0.10000000149 y 1

51
a.sml
View File

@@ -1,51 +0,0 @@
structure UpperCaseA =
struct
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight) : Real32.real vector =
let
val startX = Real32.fromInt startX
val startY = Real32.fromInt startY
val endY = windowHeight - startY
val startY = windowHeight - (startY + drawHeight)
val endX = startX + drawWidth
val windowHeight = windowHeight / 2.0
val windowWidth = windowWidth / 2.0
in
#[ (((startX * (1.0 - 0.724999964237)) + (endX * 0.724999964237)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.325000017881)) + (endY * 0.325000017881)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.324999988079)) + (endX * 0.324999988079)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.474999964237)) + (endY * 0.474999964237)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.674999952316)) + (endX * 0.674999952316)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.474999964237)) + (endY * 0.474999964237)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.324999988079)) + (endX * 0.324999988079)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.474999964237)) + (endY * 0.474999964237)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.274999976158)) + (endX * 0.274999976158)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.325000017881)) + (endY * 0.325000017881)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.724999964237)) + (endX * 0.724999964237)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.325000017881)) + (endY * 0.325000017881)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.449999988079)) + (endX * 0.449999988079)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.600000023842)) + (endX * 0.600000023842)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 1.0)) + (endX * 1.0)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 1.0)) + (endX * 1.0)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.850000023842)) + (endX * 0.850000023842)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.449999988079)) + (endX * 0.449999988079)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.550000011921)) + (endX * 0.550000011921)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.0)) + (endX * 0.0)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.0)) + (endX * 0.0)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.15000000596)) + (endX * 0.15000000596)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.550000011921)) + (endX * 0.550000011921)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0
]
end
end

BIN
dotscape

Binary file not shown.

6
fonts/a.dsc Normal file
View File

@@ -0,0 +1,6 @@
x ~0.34999999404 y ~0.34999999404 x 0.34999999404 y ~0.34999999404 x 0.300000011921 y ~0.10000000149
x ~0.300000011921 y ~0.10000000149 x 0.300000011921 y ~0.10000000149 x ~0.34999999404 y ~0.34999999404
x ~0.10000000149 y 1 x 0.20000000298 y 1 x 0.800000011921 y ~0.800000011921
x 0.800000011921 y ~0.800000011921 x 0.5 y ~0.800000011921 x ~0.10000000149 y 1
x 0.10000000149 y 1 x ~0.20000000298 y 1 x ~0.800000011921 y ~0.800000011921
x ~0.800000011921 y ~0.800000011921 x ~0.5 y ~0.800000011921 x 0.10000000149 y 1

51
fonts/a.sml Normal file
View File

@@ -0,0 +1,51 @@
structure UpperCaseA =
struct
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight) : Real32.real vector =
let
val startX = Real32.fromInt startX
val startY = Real32.fromInt startY
val endY = windowHeight - startY
val startY = windowHeight - (startY + drawHeight)
val endX = startX + drawWidth
val windowHeight = windowHeight / 2.0
val windowWidth = windowWidth / 2.0
in
#[ (((startX * (1.0 - 0.324999988079)) + (endX * 0.324999988079)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.324999988079)) + (endY * 0.324999988079)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.675000011921)) + (endX * 0.675000011921)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.324999988079)) + (endY * 0.324999988079)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.649999976158)) + (endX * 0.649999976158)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.449999988079)) + (endY * 0.449999988079)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.34999999404)) + (endX * 0.34999999404)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.449999988079)) + (endY * 0.449999988079)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.649999976158)) + (endX * 0.649999976158)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.449999988079)) + (endY * 0.449999988079)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.324999988079)) + (endX * 0.324999988079)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.324999988079)) + (endY * 0.324999988079)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.449999988079)) + (endX * 0.449999988079)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.600000023842)) + (endX * 0.600000023842)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.899999976158)) + (endX * 0.899999976158)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0999999940395)) + (endY * 0.0999999940395)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.899999976158)) + (endX * 0.899999976158)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0999999940395)) + (endY * 0.0999999940395)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.75)) + (endX * 0.75)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0999999940395)) + (endY * 0.0999999940395)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.449999988079)) + (endX * 0.449999988079)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.550000011921)) + (endX * 0.550000011921)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.0999999940395)) + (endX * 0.0999999940395)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0999999940395)) + (endY * 0.0999999940395)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.0999999940395)) + (endX * 0.0999999940395)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0999999940395)) + (endY * 0.0999999940395)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.25)) + (endX * 0.25)) / windowWidth) - 1.0,
(((startY * (1.0 - 0.0999999940395)) + (endY * 0.0999999940395)) / windowHeight) - 1.0,
(((startX * (1.0 - 0.550000011921)) + (endX * 0.550000011921)) / windowWidth) - 1.0,
(((startY * (1.0 - 1.0)) + (endY * 1.0)) / windowHeight) - 1.0
]
end
end

View File

@@ -11,8 +11,8 @@ struct
datatype parse_result = OK of AppType.triangle list | PARSE_ERROR
val structureName = "UpperCaseA"
val filename = "a.dsc"
val exportFilename = "a.sml"
val filename = "fonts/a.dsc"
val exportFilename = "fonts/a.sml"
fun ndcToLerpX num =
let