diff --git a/basis/fonts/fonts.factor b/basis/fonts/fonts.factor index 5806becd1a..fb89bdbfb0 100644 --- a/basis/fonts/fonts.factor +++ b/basis/fonts/fonts.factor @@ -9,8 +9,7 @@ size bold? italic? { foreground initial: COLOR: black } -{ background initial: COLOR: white } -shadow ; +{ background initial: COLOR: white } ; : ( -- font ) font new ; inline @@ -38,7 +37,6 @@ shadow ; [ [ italic?>> ] either? >>italic? ] [ [ foreground>> ] either? >>foreground ] [ [ background>> ] either? >>background ] - [ [ shadow>> ] either? >>shadow ] } 2cleave ] when* ; @@ -58,7 +56,7 @@ shadow ; 12 >>size ; : strip-font-colors ( font -- font' ) - clone f >>background f >>foreground f >>shadow ; + clone f >>background f >>foreground ; TUPLE: metrics width ascent descent height leading cap-height x-height ; diff --git a/basis/help/stylesheet/stylesheet.factor b/basis/help/stylesheet/stylesheet.factor index 28861794fe..1072e23423 100644 --- a/basis/help/stylesheet/stylesheet.factor +++ b/basis/help/stylesheet/stylesheet.factor @@ -34,13 +34,12 @@ H{ { font-style bold } { wrap-margin 500 } { foreground T{ rgba f 0.216 0.243 0.282 1.0 } } - { shadow COLOR: white } { page-color T{ rgba f 0.94 0.94 0.91 1.0 } } { border-width 5 } } title-style set-global SYMBOL: help-path-style -H{ { font-size 10 } { shadow f } } help-path-style set-global +H{ { font-size 10 } } help-path-style set-global SYMBOL: heading-style H{ diff --git a/basis/io/styles/styles-docs.factor b/basis/io/styles/styles-docs.factor index d5219b5522..8fcf12aae9 100755 --- a/basis/io/styles/styles-docs.factor +++ b/basis/io/styles/styles-docs.factor @@ -121,7 +121,6 @@ ARTICLE: "character-styles" "Character styles" "Character styles for " { $link stream-format } " and " { $link with-style } ":" { $subsection foreground } { $subsection background } -{ $subsection shadow } { $subsection font-name } { $subsection font-size } { $subsection font-style } @@ -206,18 +205,6 @@ HELP: background } } ; -HELP: shadow -{ $description "Character style. An instance of " { $link color } ". See " { $link "colors" } "." } -{ $examples - { $code - "\"Hello world\\n\"" - "H{ { background COLOR: gray }" - " { shadow COLOR: white }" - " { font-size 72 }" - "} format" - } -} ; - HELP: font-name { $description "Character style. Font family named by a string." } { $examples diff --git a/basis/io/styles/styles.factor b/basis/io/styles/styles.factor index 7dbb90ffb4..2d25016919 100644 --- a/basis/io/styles/styles.factor +++ b/basis/io/styles/styles.factor @@ -116,7 +116,6 @@ SYMBOL: bold-italic ! Character styles SYMBOL: foreground SYMBOL: background -SYMBOL: shadow SYMBOL: font-name SYMBOL: font-size SYMBOL: font-style diff --git a/basis/ui/gadgets/labels/labels.factor b/basis/ui/gadgets/labels/labels.factor index 9a6d7d47b3..83d15911e7 100644 --- a/basis/ui/gadgets/labels/labels.factor +++ b/basis/ui/gadgets/labels/labels.factor @@ -65,24 +65,13 @@ M: label baseline M: label cap-height label-metrics cap-height>> round ; -: draw-text* ( font text fg bg -- ) - [ rot ] dip - [ font-with-background ] when* swap - [ font-with-foreground ] when* swap - draw-text ; - -: draw-shadowed-text ( font text -- ) - [ - { 0 1 } [ over shadow>> background get draw-text* ] - with-translation - ] [ foreground get transparent draw-text* ] 2bi ; - -: draw-normal-text ( font text -- ) - foreground get background get draw-text* ; - M: label draw-gadget* - >label< over shadow>> - [ draw-shadowed-text ] [ draw-normal-text ] if ; + >label< + [ + background get [ font-with-background ] when* + foreground get [ font-with-foreground ] when* + ] dip + draw-text ; M: label gadget-text* string>> % ; diff --git a/basis/ui/gadgets/panes/panes.factor b/basis/ui/gadgets/panes/panes.factor index 4c922141f6..6f68c32ff0 100644 --- a/basis/ui/gadgets/panes/panes.factor +++ b/basis/ui/gadgets/panes/panes.factor @@ -11,7 +11,7 @@ ui.gadgets.menus ui.clipboards ui.gestures ui.traverse ui.render ui.text ui.gadgets.presentations ui.gadgets.grids ui.gadgets.tracks ui.gadgets.icons ui.gadgets.grid-lines ui.baseline-alignment colors io.styles ; -FROM: io.styles => foreground background shadow ; +FROM: io.styles => foreground background ; IN: ui.gadgets.panes TUPLE: pane < track @@ -199,12 +199,11 @@ MEMO: specified-font ( assoc -- font ) [ font-size swap at >>size ] [ foreground swap at >>foreground ] [ background swap at >>background ] - [ shadow swap at >>shadow ] } cleave derive-font ; : apply-font-style ( style gadget -- style gadget ) - { font-name font-style font-size foreground background shadow } + { font-name font-style font-size foreground background } pick extract-keys specified-font >>font ; : apply-style ( style gadget key quot -- style gadget )