[Top][All Lists]

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

Re: [Texmacs-dev] Under/Overbrace help, please !

From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Under/Overbrace help, please !
Date: Thu, 8 May 2003 12:21:50 +0200 (CEST)

On 7 May 2003, Nix N. Nix wrote:
> I am trying to use fn->draw (dev, <string>, ...) to draw the
> under/overbrace corners.  Unfortunately, I still don't have my fonts
> configured properly, and all I get is an ugly, red
> <braceru>
> instead of the nice brace-corner.
> Can you please send me a patch to the fonts directory that will make it
> possible for me to type C-q, braceru, Enter and see the appropriate
> character ?  The characters I need are the followings:
> cmex#122 == "braceld"
> cmex#123 == "bracerd"
> cmex#124 == "bracelu"
> cmex#125 == "braceru"

I did that for the next version. I see two ways for
you to implement wide braces with these characters:
the easy way would be to find the height of both extremes of
the brace characters and the width of an extensible line.
The disadvantage of this "cheap" method is that this height and
width really depend on the font, so you probably won't be able
to get things right in a robust way (think about a bold cmex font).

The second, most robust, implementation would be to create a special
font with the wide characters <brace-under-1>, <brace-under-2>, ...
and <brace-over-1>, <brace-over-2>, ... I suggest to create
real bitmaps for each character.

I have looked a bit how you might do that. First of all you should add
support for the <brace-...> characters in math_font_rep::search_font.
Next you might add a new constructor in virtual_font_rep::compile
for the repetition of a character. Finally, you will have to do
something in order to get this constructor called with the right
parameters for character names starting with "<brace-".
The height and the width of the horizontal line can then be
determined from the extremity of a bitmap for braceld
or one of the others.

Yet another idea might be to find a robust trick for getting
the exact height and width for the horizontal lines from
the font itself. But I don't see an easy way to do that right now.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]