@@ -1561,13 +1561,12 @@ createElement context children rendered =
15611561 -- , existingStyles
15621562 -- )
15631563 -- else
1564− ( textElement
1565− (if context == asParagraph then
1566− str
1564+ ( (if context == asEl then
1565+ textElementFill str
15671566
1568− else
1569− str
1570− )
1567+ else
1568+ textElement str
1569+ )
15711570 :: htmls
15721571 , existingStyles
15731572 )
@@ -1627,8 +1626,11 @@ createElement context children rendered =
16271626 -- )
16281627 -- else
16291628 ( ( key
1630− , textElement
1631− str
1629+ , if context == asEl then
1630+ textElementFill str
1631+
1632+ else
1633+ textElement str
16321634 )
16331635 :: htmls
16341636 , existingStyles
@@ -1963,14 +1965,13 @@ textElement str =
19631965textElementFill : String -> VirtualDom.Node msg
19641966textElementFill str =
19651967 VirtualDom.node "div"
1966− [ VirtualDom.property "className"
1967− (Json.string <|
1968− String.join " "
1969− [ classes.any
1970− , classes.text
1971− , classes.widthFill
1972− , classes.heightFill
1973− ]
1968+ [ Html.Attributes.class
1969+ (String.join " "
1970+ [ classes.any
1971+ , classes.text
1972+ , classes.widthFill
1973+ , classes.heightFill
1974+ ]
19741975 )
19751976 ]
19761977 [ VirtualDom.text str ]
@@ -2308,7 +2309,38 @@ renderNullAdjustmentRule fontToAdjust otherFontName =
23082309 ]
23092310
23102311
2311−renderFontAdjustmentRule fontToAdjust ( parentAdj, textAdjustment ) otherFontName =
2312+fontRule name modifier ( parentAdj, textAdjustment ) =
2313+ [ bracket
2314+ ("."
2315+ ++ name
2316+ ++ "."
2317+ ++ modifier
2318+ ++ ", "
2319+ ++ "."
2320+ ++ name
2321+ ++ " ."
2322+ ++ modifier
2323+ )
2324+ parentAdj
2325+ , bracket
2326+ ("."
2327+ ++ name
2328+ ++ "."
2329+ ++ modifier
2330+ ++ "> ."
2331+ ++ Internal.Style.classes.text
2332+ ++ ", ."
2333+ ++ name
2334+ ++ " ."
2335+ ++ modifier
2336+ ++ " > ."
2337+ ++ Internal.Style.classes.text
2338+ )
2339+ textAdjustment
2340+ ]
2341+
2342+
2343+renderFontAdjustmentRule fontToAdjust ( full, capital ) otherFontName =
23122344 let
23132345 name =
23142346 if fontToAdjust == otherFontName then
@@ -2318,34 +2350,7 @@ renderFontAdjustmentRule fontToAdjust ( parentAdj, textAdjustment ) otherFontNam
23182350 otherFontName ++ " ." ++ fontToAdjust
23192351 in
23202352 String.join " "
2321− [ bracket
2322− ("."
2323− ++ name
2324− ++ "."
2325− ++ classes.sizeByCapital
2326− ++ ", "
2327− ++ "."
2328− ++ name
2329− ++ " ."
2330− ++ classes.sizeByCapital
2331− )
2332− parentAdj
2333− , bracket
2334− ("."
2335− ++ name
2336− ++ "."
2337− ++ classes.sizeByCapital
2338− ++ "> ."
2339− ++ Internal.Style.classes.text
2340− ++ ", ."
2341− ++ name
2342− ++ " ."
2343− ++ classes.sizeByCapital
2344− ++ " > ."
2345− ++ Internal.Style.classes.text
2346− )
2347− textAdjustment
2348− ]
2353+ (fontRule name classes.sizeByCapital capital ++ fontRule name classes.fullSize full)
23492354
23502355
23512356bracket selector rules =
@@ -2358,17 +2363,12 @@ bracket selector rules =
23582363
23592364fontAdjustmentRules converted =
23602365 ( [ ( "display", "block" )
2361−
2362− -- , ( "line-height", String.fromFloat converted.height )
2363− -- , ( "font-size", String.fromFloat (1 + converted.height + converted.vertical) ++ "em" )
23642366 ]
23652367 , [ ( "display", "inline-block" )
23662368 , ( "line-height", String.fromFloat converted.height )
23672369 , ( "vertical-align", String.fromFloat converted.vertical ++ "em" )
23682370 , ( "font-size", String.fromFloat converted.size ++ "em" )
23692371 ]
2370− -- , [ ( "font-size", String.fromFloat converted.size ++ "em" )
2371− -- ]
23722372 )
23732373
23742374
@@ -2380,7 +2380,9 @@ typefaceAdjustment typefaces =
23802380 case face of
23812381 FontWith with ->
23822382 Just
2383− (fontAdjustmentRules
2383+ ( fontAdjustmentRules
2384+ (.full (convertAdjustment with.adjustment))
2385+ , fontAdjustmentRules
23842386 (.capital (convertAdjustment with.adjustment))
23852387 )
23862388
@@ -3352,16 +3354,16 @@ convertAdjustment adjustment =
33523354 capitalSize =
33533355 1 / (ascender - newBaseline)
33543356
3357+ fullSize =
3358+ 1 / (ascender - descender)
3359+
33553360 fullVertical =
3356− (oldMiddle - newFullMiddle) * 2
3361+ 1 - ascender
3362+
3363+ -- (oldMiddle - newFullMiddle) * 2
33573364 in
33583365 { full =
3359− { vertical = fullVertical
3360− , height =
3361− (ascender - descender)
3362− - abs fullVertical
3363− , size = 1.0
3364− }
3366+ adjust fullSize (ascender - descender) fullVertical
33653367 , capital =
33663368 adjust capitalSize (ascender - newBaseline) capitalVertical
33673369 }
@@ -3371,7 +3373,5 @@ adjust size height vertical =
33713373 { vertical = vertical
33723374 , height =
33733375 height / size
3374−
3375− -- vertical
33763376 , size = size
33773377 }