@@ -2173,67 +2173,6 @@ toStyleSheet options styleSheet =
2173 VirtualDom.node "style" [] [ VirtualDom.text (toStyleSheetString options styleSheet) ]
2173 VirtualDom.node "style" [] [ VirtualDom.text (toStyleSheetString options styleSheet) ]
2177−-- case typefaceAdjustment typefaces of
2180−-- Just ( parentAdj, textAdjustment ) ->
2187−-- ++ classes.sizeByCapital
2192−-- ++ classes.sizeByCapital
2200−-- ++ classes.sizeByCapital
2202−-- ++ Internal.Style.classes.text
2206−-- ++ classes.sizeByCapital
2208−-- ++ Internal.Style.classes.text
2212−-- renderTopLevels rule =
2214−-- FontFamily name typefaces ->
2216−-- getImports font =
2218−-- ImportFont _ url ->
2219−-- Just ("@import url('" ++ url ++ "');")
2220−-- FontWith { url } ->
2223−-- Just ("@import url('" ++ x ++ "');")
2230−-- |> List.filterMap getImports
2231−-- |> String.join "\n"
2237renderTopLevelValues rules =
2176renderTopLevelValues rules =
2239 withImport font =
2178 withImport font =
@@ -2369,12 +2308,17 @@ bracket selector rules =
2370fontAdjustmentRules converted =
2309fontAdjustmentRules converted =
2371 ( [ ( "display", "block" )
2310 ( [ ( "display", "block" )
2372− , ( "line-height", String.fromFloat converted.height )
2312+ -- , ( "line-height", String.fromFloat converted.height )
2313+ -- , ( "font-size", String.fromFloat (1 + converted.height + converted.vertical) ++ "em" )
2374 , [ ( "display", "inline-block" )
2315 , [ ( "display", "inline-block" )
2375 , ( "line-height", String.fromFloat converted.height )
2316 , ( "line-height", String.fromFloat converted.height )
2376 , ( "vertical-align", String.fromFloat converted.vertical ++ "em" )
2317 , ( "vertical-align", String.fromFloat converted.vertical ++ "em" )
2318+ , ( "font-size", String.fromFloat converted.size ++ "em" )
2320+ -- , [ ( "font-size", String.fromFloat converted.size ++ "em" )
@@ -3339,7 +3283,11 @@ convertAdjustment adjustment =
3339 |> Maybe.withDefault adjustment.baseline
3283 |> Maybe.withDefault adjustment.baseline
3341 capitalVertical =
3285 capitalVertical =
3342− (oldMiddle - newCapitalMiddle) * 2
3286+ 1 - ascender
3290+ 1 / (ascender - newBaseline)
3344 fullVertical =
3292 fullVertical =
3345 (oldMiddle - newFullMiddle) * 2
3293 (oldMiddle - newFullMiddle) * 2
@@ -3349,9 +3297,18 @@ convertAdjustment adjustment =
3349 , height =
3297 , height =
3350 (ascender - descender)
3298 (ascender - descender)
3351 - abs fullVertical
3299 - abs fullVertical
3353 , capital =
3302 , capital =
3354− { vertical = capitalVertical
3355− , height = (ascender - newBaseline) - abs capitalVertical
3303+ adjust capitalSize (ascender - newBaseline) capitalVertical
3307+adjust size height vertical =
3308+ { vertical = vertical