L.S.,
When writing several lines of text in a window, with different font families, all text is written in the same font. Bold, underline and italic work properly. See the attached program and image.
Package: wxHaskell 0.11.0,
wxWidgets 2.8.9
OS: Windows XP
Compiler: GHC version 6.10.1
--
Regards,
Henk-Jan van Tuyl
--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--
FontFamilies.lhs
2009-01-06
data FontFamily
= FontDefault
| FontDecorative
| FontRoman
| FontScript
| FontSwiss
| FontModern
> import Graphics.UI.WX
> main :: IO ()
> main = start $
> do
> f <- frame [ fontSize := 18 ]
> st1 <- staticText f [ text := "FontDefault", fontFamily := FontDefault ]
> st2 <- staticText f [ text := "FontDecorative", fontFamily := FontDecorative ]
> st3 <- staticText f [ text := "FontRoman", fontFamily := FontRoman ]
> st4 <- staticText f [ text := "FontScript", fontFamily := FontScript ]
> st5 <- staticText f [ text := "FontSwiss", fontFamily := FontSwiss ]
> st6 <- staticText f [ text := "FontModern", fontFamily := FontModern ]
> st7 <- staticText f [ text := "ShapeItalic", fontShape := ShapeItalic ]
> st8 <- staticText f [ text := "ShapeSlant", fontShape := ShapeSlant ]
> st9 <- staticText f [ text := "fontUnderline", fontUnderline := True ]
> st10 <- staticText f [ text := "WeightNormal", fontWeight := WeightNormal ]
> st11 <- staticText f [ text := "WeightBold", fontWeight := WeightBold ]
> st12 <- staticText f [ text := "WeightLight", fontWeight := WeightLight ]
> st13 <- staticText f [ text := "WeightBold/fontUnderline", fontWeight := WeightBold, fontUnderline := True ]
> st14 <- staticText f [ text := "fontSwiss", font := fontSwiss { _fontSize = 18}]
>
> set f [ layout :=
> column 1 [ widget st1
> , widget st2
> , widget st3
> , widget st4
> , widget st5
> , widget st6
> , widget st7
> , widget st8
> , widget st9
> , widget st10
> , widget st11
> , widget st12
> , widget st13
> , widget st14
> ]
> ]
> return ()
<<attachment: FontFamilyBug.JPG>>
------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB
_______________________________________________ wxhaskell-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel
