Skip to content

Commit

Permalink
Add crispy font styles in Elm rather than CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
valrus committed Apr 23, 2017
1 parent 735e00d commit 8af60a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/static/js/DialogBoxes.elm
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,6 @@ textLineOffset offset lineNum chara =
(DialogBox.boxHeight offset) + 32 + (36 * lineNum) + (Character.yOffset chara)


crispyFontStyles : StyleList
crispyFontStyles =
[ ( "font-smooth", "never" )
, ( "-moz-osx-font-smoothing", "grayscale" )
, ( "-webkit-font-smoothing", "none" )
]


renderTextLine : Character.Name -> Int -> Int -> String -> Svg.Svg Msg
renderTextLine chara offset lineNum text =
let
Expand Down
7 changes: 7 additions & 0 deletions src/static/js/Helpers.elm
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,10 @@ styleCss : StyleList -> String
styleCss style =
String.join ";\n" <| List.map (\(a, b) -> a ++ ": " ++ b) style


crispyFontStyles : StyleList
crispyFontStyles =
[ ( "font-smooth", "never" )
, ( "-moz-osx-font-smoothing", "grayscale" )
, ( "-webkit-font-smoothing", "none" )
]
1 change: 1 addition & 0 deletions src/static/js/UndertaleDialog.elm
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ view : Model -> Html Msg
view model =
div
[ Html.Attributes.id "content"
, style crispyFontStyles
]
[ title model.staticRoot
, characterButtons model.staticRoot model.characters
Expand Down

0 comments on commit 8af60a0

Please sign in to comment.