[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xlib:create-glyph-cursor -- a spec issue
> What is
> supposed to happen when mask-font is specified but mask-char is omitted? The
> code just wires mask-char=0, which doesn't seem particularly useful. Several
> alternatives are possible.
>
> 1. Signal error
>
> 2. Default to source-char
>
> 3. Default to 0
>
> 4. Default to (font-default-char mask-font)
>
> 5. If (eq source-font mask-font), default to (1+ source-char), else signal
> error.
>
> I suggest #5. Since the source/mask-char's have to be tightly coupled, it's not
> reasonable that any single value could serve as a default mask-char, so #2 is
> plausible but #1 is more correct. But #5 also allows a short-hand for a common
> idiom based on a special font structure (like that of the "cursor" font).
>
> 5 sounds reasonable, especially if mask-font defaults to source-font.
But it doesn't. Omitting mask-font means "no mask", i.e. "mask is all 1's".