CLIM mail archive

[Prev][Next][Index][Thread]

Re: Buggy WITH-TEXT-STYLE Macro??



>  Date: Thu, 3 Dec 1992 14:23 EST
>  From: Mark Nahabedian <naha@riverside.scrc.symbolics.com>
>
>	   Date: Thu, 3 Dec 1992 09:08 EST
>  	 From: Markus Fischer <MF@sun4.sger>
>
>	      Date: Thu, 3 Dec 1992 08:25+0100
>	      From: berni@iml.fhg.de
>
>	      I'm using CLIM 1.1 with MCL 2.0
>	      and CLIM 1.1 under Genera 8.1.
>
>	      If I'm using a text style with :bold face inside an enviromnent of 
>	      :italic face, the text gets formatted in (:bold :italic) face.
>	      As all text-styles are fully specified, I assume it's a bug.
>	      If I misunderstand the Documentation and it's a feature, 
>	      how can I do what I want (i.e. formatting the
>	      text :bold, but NOT :italic??
>
>    The problem is that WITH-TEXT-STYLE always merges the new text style with
>	   the existing one. The exact behavior is documented for the function 
>	   MERGE-TEXT-STYLES.
>
>  The question is about what should happen when a text style specifying
>  the face :bold is merged with a text style specifying the face :italic.
>  What berni expects is a text style with a face of :bold.  That is what I
>  would expect since the face of :bold that he asked for is fully
>  specified (i.e. not NIL).  That's what I would expect.  What he is
>  getting is a text face of (:bold :italic).
>
>Another way to look at this is that there is a text face :bold-italic,
>and Berni did NOT want that one, he wanted some text in :italic and
>some in :bold.  Both interpretations (to merge or not to merge) are
>possible and each makes sense in some contexts.  I think Markus's
>suggestion of a keyword bears looking into.
>
>    However, you seem to want NO merging at all, since your test code
>	   always specifies the text-style completely. I wrote a kludge to get
>	   the behavior you're probably looking for. It temporarliy (for the extent
>	   of the body) binds the medium's text-style to the medium's default text
>	   style. 


Well -- to switch merging off is too much of a good thing, as I might as 
well want to merge the text styles in e.g. the size attribute. To allow
merging
:bold and :italic, it would be necessary to define something like (:bold
nil) or
(nil :italic) as face specifiers, but treat them as not fully specified
style 
specifiers, where merging should be applied.


- Stefan Bernemann   (berni@iml.fhg.de)


0,,


Main Index | Thread Index