# HG changeset patch # User Stefan Vogel # Date 1443995134 -7200 # Node ID 26d226d61d323d098c2d83c0df403b8770dde72a # Parent e310074c6d7793192c5f9ddf3fc1fd03de256482 #BUGFIX class: XftFontDescription::FCFontListParser fix outline parsing diff -r e310074c6d77 -r 26d226d61d32 XftFontDescription.st --- a/XftFontDescription.st Sun Oct 04 23:44:15 2015 +0200 +++ b/XftFontDescription.st Sun Oct 04 23:45:34 2015 +0200 @@ -350,8 +350,7 @@ ! new -"/ self halt. - ^ super new. + ^ self basicNew initialize. ! ! !XftFontDescription class methodsFor:'change & update'! @@ -467,10 +466,6 @@ !XftFontDescription methodsFor:'accessing'! -encoding - ^ encoding ? 'iso10646-1' -! - face ^ face ? '' ! @@ -993,6 +988,14 @@ !XftFontDescription methodsFor:'initialization'! +initialize + "Invoked when a new instance is created." + + super initialize. + size := 0. + encoding := #'iso10646-1'. +! + setDevice: deviceArg patternId: patternIdArg fontId: fontIdArg device := deviceArg. fontId := fontIdArg. @@ -1011,6 +1014,9 @@ size isNil ifTrue:[ size := 0. ]. + encoding isNil ifTrue:[ + encoding := #'iso10646-1'. + ]. "Created: / 21-12-2013 / 00:46:10 / Jan Vrany " "Modified: / 30-12-2013 / 12:49:58 / Jan Vrany " @@ -1860,9 +1866,11 @@ %{ #ifdef XFT if ( __INST(sharedDrawId) != nil ) { - if (XftDrawDrawable(XFT_DRAW(__INST(sharedDrawId))) == DRAWABLE(drawableId)) { + XftDraw *xftDrawable = XFT_DRAW(__INST(sharedDrawId)); + + if (XftDrawDrawable(xftDrawable) == DRAWABLE(drawableId)) { __INST(sharedDrawId) = nil; - XftDrawDestroy(DRAWABLE(drawableId)); + XftDrawDestroy(xftDrawable); } } RETURN (self); @@ -1937,7 +1945,7 @@ ( #('family:' 'style:' 'slant:' 'weight:' 'width:' 'pixelsize:' 'spacing:' 'foundry:' 'antialias:' - 'file:' 'outline' 'scalable:' 'charset:' 'lang:' + 'file:' 'outline:' 'scalable:' 'charset:' 'lang:' 'fontversion:' 'fontformat:' 'decorative:' 'index:' 'outline:' 'familylang:' 'stylelang:' 'fullname:' 'fullnamelang:' 'capability:' 'hash:' 'postscriptname:' @@ -2191,6 +2199,11 @@ lineStream skipSeparators. s := lineStream nextAlphaNumericWord. ^ (s indexOfSubCollection:'True') ~~ 0. "/ match at least 'True' and 'FCTrue' + + " + 'xxFalse' indexOfSubCollection:'True' + 'FcTrue' indexOfSubCollection:'True' + " ! getInteger