On Wed, Oct 10, 2007 at 12:57:03AM +0200, Dov Feldstern wrote:
> 
> 
> Martin Vermeer wrote:
> >On Sun, Oct 07, 2007 at 02:26:48AM +0200, Dov Feldstern wrote:

...
 
> If I understand correctly, the current implementation of InsetFlex 
> *always* calls getDrawFont, doesn't it? So every CharStyle inset is 
> using an explicitly set font, and not the one that would be derived from 
> the content's character attributes?

Yes... it takes the font definition from the layout files, and realizes
it against the current font (IIUC). I must say that I am not sure that
what happens with the font inside metrics and draw is quite right...
 
> >> For these reasons, I would prefer to see charstyle-insets work as 
> >> follows: the inset should make sure that inside it, the current_font is 
> >> set to the font settings required by this charstyle; and maybe also make 
> >> sure that the current_font can't be changed. Beyond that, no extra work 
> >> would be needed: no special output methods (i.e., no "latex command" 
> >> necessary in the layout, no special drawing methods --- all these would 
> >> be handled by the already existing character attributes mechanisms. But 
> >> the UI would still be that of an inset.

But having a latex command is a good thing! IMHO. 

> >I am not sure I understand you, but we're pretty much already
> >there. We only need an inset's draw or latex commands if
> >the inset does something above and beyond drawing / outputting
> >the text it contains. Otherwise not. Methinks you really haven't
> >looked much at the inset mechanism (which you readily admit).
> >
> 
> I'm looking, for example, at a "noun" charstyle inset: it would be 
> setting the font to something *explicit* (as defined in the mini-layout 
> for noun: Smallcaps); the latex output will contain additions relative 
> to just the contents of the inset, namely a "\noun{" and "}" as you 
> explained above. So, this is what I'm calling a second mechanism for 
> charstyles, alongside the already existing character attributes: it 
> *would* have been possible to not have any of these explicit settings; 
> and rather, to just make sure that the text inside the inset has the 
> "noun" character attribute set. That way, you would still have the inset 
> UI, but the charstyles would be handled using the same mechanism used 
> for font attributes everywhere else in the text. That's what I was 
> trying to say.
> 
> So, we *are* now going to be having two separate font attributes 
> mechanisms: the "old" character attributes, and the "new" mini-layouts. 
> I think that ultimately we should strive to have only one mechanism, 
> though I'm starting to think that maybe the mini-layouts could be that 
> one mechanism...
> 
> Dov

Hmmm... would have to see it first to understand.

- Martin
 

Reply via email to