Re: Patch: Implement qfont_loader::available

2002-10-13 Thread John Levon

On Sat, Oct 12, 2002 at 04:43:24PM +0200, Dekel Tsur wrote:

 The attached patch fixes this.
 OK to apply ?

Have you tested this in both cases ?

 + return getfontinfo(f)-font.exactMatch();

Won't this return a false negative if the font *size* didn't match
exactly ? Aren't we only concerned with the face ?

regards
john

-- 
That's just kitten-eating wrong.
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Saturday 12 October 2002 20:38, Dekel Tsur wrote:
 Since, QT uses unicode internally, we should use that.
 This patch allow displaying of non iso8859-1 chars.
 Please test.

I am unable to display the euro symbols (with or without this patch)
with the qt-version.
(The xforms-version is ok in using iso8859-15 screen-coding)

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPalS2rewfbDGmeqhAQHtuAQA2LrqA7WkOFv6U7irtawkstFgeeNjlE72
d0u5nxDGHlpQIQbVf5VWiDvlxxrc0WMHq0Figxu44euTio+AuvKD5h/mLBSPcRs3
pOGeQyRotTfs2WNzk4R9poR2Bs1ezbTyb21Eg6iRXPXKUcMoYnsuUW+JdxcnpRac
hewcsp8p3Cw=
=0wdF
-END PGP SIGNATURE-



qt.gif
Description: GIF image


xforms.gif
Description: GIF image


Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 12:52, Dekel Tsur wrote:
 This is because the lib/languages file does not instruct to use the
 iso8859-15 encoding for your language.
 Just edit the file, and replace the current encoding for your language
 by iso8859-15.

This helped. But why are the preferences not used?

\screen_font_encoding iso8859-15

...
 PS: Should we replace all occurrences of iso8859-1 by iso8859-15 ?

I vote for it. But for me it is sufficient to set it in preferences.

What hurts me more is:
as soon, as i press the modify-key (e.g. to enter ä on a us-keyboard) lyx blows away.
The relevant backtrace:

#3  0x083d653b in Letext () at abort.C:9
#4  0x0811fe76 in error_handler (err_sig=11) at ../src/lyx_main.C:202
#5  signal handler called
#6  0x08302669 in QLyXKeySym::getSymbolName (this=0x8889ff0)
at /usr/include/g++/std/bastring.h:220
#7  0x0813a21f in LyXFunc::processKeySym (this=0xbfffe1c4, keysym=0xbfffe1c4,
state=none) at lyxfunc.C:163
#8  0x08065cfb in BufferView::Pimpl::workAreaKeyPress (this=0x87f4cb0, key=
{px = 0xbfffe21c, pn = {pi_ = 0x0}}, state=none)
at BufferView_pimpl.C:406
#9  0x08404158 in 
boost::detail::function::void_function_obj_invoker2boost::_bi::bind_tvoid, 
boost::_mfi::mf2void, BufferView::Pimpl, boost::shared_ptrLyXKeySym, 
key_modifier::state, boost::_bi::list3boost::_bi::valueBufferView::Pimpl *, 
boost::arg1, boost::arg2  , void, boost::shared_ptrLyXKeySym, 
key_modifier::state::invoke (function_obj_ptr=
  {obj_ptr = 0x87ede20, const_obj_ptr = 0x87ede20, func_ptr = 0x87ede20},
a0=0xbfffe2dc, a1=none) at ../boost/boost/bind/mem_fn_template.hpp:213
#10 0x0849fbbc in boost::signal2void, boost::shared_ptrLyXKeySym, 
key_modifier::state, boost::last_valuevoid, int, lessint, boost::function2void, 
boost::shared_ptrLyXKeySym, key_modifier::state, boost::empty_function_policy, boost
::empty_function_mixin, allocatorboost::function_base  ::operator() (
this=0x87f4dc0, a1=0xbfffe3d4, a2=none)
at ../../../boost/boost/function/function_template.hpp:328
#11 0x083b54c7 in QContentPane::keyPressEvent (this=0x87f59e0, e=0xbfffe630)
at QContentPane.C:142
#12 0x40248580 in QWidget::event () from /usr/lib/qt3/lib/libqt.so.3
#13 0x401c4966 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt.so.3

This is the output from lyx:
...
repainting 118,430 1,20
repainting 118,430 1,20
repainting 118,430 1,20
Press key 65535 text none, ascii 0
sym empty in getSymbolName()

lyx: SIGSEGV signal caught
...
Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPalj+rewfbDGmeqhAQGl1QP+NBD/kle1SXV+m7EABnq9CGgkJgbD5i+J
cs/o3CxrnTNimzt4ibn3447s6ZZdjMeF3dwFdOs9i1rtsJJCPoFvcBJPeU39jYgK
mLiphpl/UhHT4rYx/My0SNRbes09fNgroagQoeOj4iuq3n8TlCkHaZOaeCdrMvgq
36DIEntwyWg=
=Mg7P
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 12:49, Philipp Reichmuth wrote:
 DT Since, QT uses unicode internally, we should use that.

 Unicode support in Qt 2.1 is *bad*, and even 3 has some problems. I'm
 not sure about RTL scripts, for example. At least for Qt 2.1 and Qt
 for Windows, this could mean some serious working around trouble for
 Hebrew and Arabic.

QT3 here, I am not using Hebrew  or Arabic.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPalmNLewfbDGmeqhAQHFFQP+LBxCzfjU9rSO4Rqw2AhqdI219XnIhzYk
N1PwHKHiSp6RgmWua/QLgT46EWBqWNlx/6PMUHUZBMFBrr08CABkKhJueAlsohFP
cqMCMO6ZpWLVcuEmBz50qXTmZkJRr88nO0tPYSMmSWtM7xF+IbM02ebFX6moET4N
ZBfJgYlOpBo=
=EeZK
-END PGP SIGNATURE-




120 26138636

2002-10-13 Thread yang

È«ÊÐ×î±ãÒ˵ÄÊл°Í¨120Ôª Çëµç26138636  


Re: Patch: Implement qfont_loader::available

2002-10-13 Thread Dekel Tsur

On Sat, Oct 12, 2002 at 04:53:08PM +0100, John Levon wrote:
 On Sat, Oct 12, 2002 at 04:43:24PM +0200, Dekel Tsur wrote:
 
  The attached patch fixes this.
  OK to apply ?
 
 Have you tested this in both cases ?

Yes.

  +   return getfontinfo(f)-font.exactMatch();
 
 Won't this return a false negative if the font *size* didn't match
 exactly ? Aren't we only concerned with the face ?

I checked and it exactMatch() considers only the family.
In any case, we only use it for the Type1 math fonts, which are scalable.



Re: Patch: unicode support in qt painter

2002-10-13 Thread Philipp Reichmuth


DT Since, QT uses unicode internally, we should use that.

Unicode support in Qt 2.1 is *bad*, and even 3 has some problems. I'm
not sure about RTL scripts, for example. At least for Qt 2.1 and Qt
for Windows, this could mean some serious working around trouble for
Hebrew and Arabic.

Philipp




Re: Patch: unicode support in qt painter

2002-10-13 Thread Dekel Tsur

On Sun, Oct 13, 2002 at 12:02:44PM +0100, Kornel Benko wrote:
 On Saturday 12 October 2002 20:38, Dekel Tsur wrote:
  Since, QT uses unicode internally, we should use that.
  This patch allow displaying of non iso8859-1 chars.
  Please test.
 
 I am unable to display the euro symbols (with or without this patch)
 with the qt-version.
 (The xforms-version is ok in using iso8859-15 screen-coding)

This is because the lib/languages file does not instruct to use the 
iso8859-15 encoding for your language.
Just edit the file, and replace the current encoding for your language
by iso8859-15.

PS: Should we replace all occurrences of iso8859-1 by iso8859-15 ?



Patch: unicode support in qt painter

2002-10-13 Thread Dekel Tsur

Since, QT uses unicode internally, we should use that.
This patch allow displaying of non iso8859-1 chars.
Please test.



patch.gz
Description: Binary data


Re: Patch: unicode support in qt painter

2002-10-13 Thread Dekel Tsur

On Sun, Oct 13, 2002 at 01:49:12PM +0200, Philipp Reichmuth wrote:
 
 DT Since, QT uses unicode internally, we should use that.
 
 Unicode support in Qt 2.1 is *bad*, and even 3 has some problems. I'm
 not sure about RTL scripts, for example. At least for Qt 2.1 and Qt
 for Windows, this could mean some serious working around trouble for
 Hebrew and Arabic.

We do not rely on QT code for Hebrew  Arabic- we use our own.
We just need the ability to access all the Unicode characters.




Type1 math fonts use_scalable_fonts

2002-10-13 Thread Dekel Tsur

If use_scalable_false is false, then LyX displays the type1 math fonts at 12
points, regardless of the size they should be.

The cause for this problem is as follows: 
  XListFonts(...,-*-cmsy-*-*-*-*-*-*-*-*-*-*-*-*,...)
return *2* matches, 
-bluesky-cmsy-medium-r-normal--0-0-0-0-m-0-adobe-fontspecific
-bluesky-cmsy-medium-r-normal--12-120-75-75-m-0-adobe-fontspecific

The 2nd match is correct while the 1st one is wrong 
(as the font is scalable).

The font is recognized as scalable in FontInfo::query.
However, in FontInfo::getFontname, the first match causes closestind
to be not equal to -1, and therefore, the conditional
   if (scalable  (lyxrc.use_scalable_fonts || closestind == -1))
is not satisfied, and therefore the font is not scaled.
There are several possible solutions:

1. Call XListFonts(...,-*-cmsy-*,...) which only gives the correct match.
This works on xfree but may not be portable:
http://marc.theaimsgroup.com/?l=lyx-develm=102748076625757w=2

2. Ignore matches whose 12th field is zero, while its 7th field is non-zero:
 -143,6 +144,9  void FontInfo::query()
}
scalable = true;
};
+   if (sizes[i]  0 
+   lyx::atoi(token(name, '-', 12)) == 0)
+   sizes[i] = 0;
};
XFreeFontNames(list);
}

3. Change the if statement above to

 -51,7 +51,8  string const FontInfo::getFontname(int s
}
}
 
-   if (scalable  (lyxrc.use_scalable_fonts || closestind == -1)) {
+   if (scalable  (lyxrc.use_scalable_fonts || closestind == -1
+|| error/size  0.2)) {
// We can use scalable
string const font = resize(strings[scaleindex], size);
lyxerr[Debug::FONT]  Using scalable font to get\n

This means that if use_scalable_fonts is false, but the size of closest
available bitmap font is not close enough, we still prefer to rescale the
font.
Note that this change can be made even if (1) or (2) are also applied.
Clearly, if I have, for example, the font Times as a bitmap font at sizes
14,17,20, and as an outline(scalable) font, and I want a font of size 30 on
screen, it is preferable to use the scalable font over the 20pt bitmap font.
In fact, the 0.2 can be replaced by a lyxrc variable scalable_font_threshold
and the use_scalable_fonts can be removed
(use_scalable_fonts=true is equivalent to having scalable_font_threshold=0).

Note: The description of the use_scalable_fonts in the preferences dialog is
not accurate.
What this variable means is as follows:
* use_scalable_fonts=false: If the font available as both bitmap and as an
  outline (scalable) font, prefer the bitmap font.
* use_scalable_fonts=true:  If the font available as both bitmap and as an
  outline font, prefer the scalable font.









Suggestion for the QT frontend preferences dialog

2002-10-13 Thread Dekel Tsur

Few suggestions:

- The Screen Fonts-Rescale bitmap fonts button should not be implemented
(not used by the QT frontend).

- The Screen Fonts-Encoding field should not be implemented
(not used by the QT frontend).

- The Printer-Printer commands and flags buttons should not be implemented.
It is possible that we will decide to remove the printer code in the future.



Re: UI question about multiline formulas

2002-10-13 Thread Gady Kozma

What is the previous behaviour? Some magic like that has been in for
ages.

The 1.1.6 behavior was to put everything in the leftmost column and let the 
user move things about with ctrl-tabs. What do you mean when you say some 
magic?

My question was more in the patch level: what kind of solution to my problem 
would you accept if I do it? It was not on a user level, of course you can 
always cut and paste to make the equation look OK.

Gady

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




Re: Patch: Implement qfont_loader::available

2002-10-13 Thread John Levon

On Sat, Oct 12, 2002 at 09:28:04PM +0200, Dekel Tsur wrote:

  Won't this return a false negative if the font *size* didn't match
  exactly ? Aren't we only concerned with the face ?
 
 I checked and it exactMatch() considers only the family.
 In any case, we only use it for the Type1 math fonts, which are scalable.

Super, thanks.

john

-- 
That's just kitten-eating wrong.
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 01:15:54PM +0100, Kornel Benko wrote:

 as soon, as i press the modify-key (e.g. to enter ä on a us-keyboard) lyx blows 
away.
 The relevant backtrace:

Run xev and tell us the output when you press your modify key

regards
john



XML file format status

2002-10-13 Thread Torsten Bronger

Halloechen!

I've read that the LyX developer take into
consideration to use an XML based file format
for the documents.

Can anybody give ma a concise status of this plan?
Or is there already an internet reference?

Thank you!

Tschoe,
Torsten.



!realcut and multiple par delete

2002-10-13 Thread John Levon


If we are cutting multiple pars, the pars are excised from the par list
and buf in CutAndPaste.C is set to point to them. They are finally
deleted when the next operation resets buf.

Now if we are deleting (!realcut) we don't seem to set buf, and the
paragraphs that are removed fall through the floor. Where have I misread
? (1.2 source btw)

john
-- 
That's just kitten-eating wrong.
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 17:11, John Levon wrote:
 On Sun, Oct 13, 2002 at 01:15:54PM +0100, Kornel Benko wrote:
  as soon, as i press the modify-key (e.g. to enter ä on a us-keyboard)
  lyx blows away. The relevant backtrace:

 Run xev and tell us the output when you press your modify key

KeyPress event, serial 27, synthetic NO, window 0x2c1,
root 0x36, subw 0x0, time 3736299322, (101,167), root:(105,187),
state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 characters:  

Hope this helps.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPamnPLewfbDGmeqhAQGEfQQAyUlju3yKBnShxy3xFzrqgeWAPdg08JUw
6qJ6ECWgA9+PoG/ZBLZcLFcjPYibZNEt4yPyxyX6UxDEH7G14jDkSthiPtNChB2Z
BNH5svj/59aEdMODstPrD/6iH9rCQtoEOWZjGSX6TgTlc7lVmCYyZTR//GKfWv5w
EUqYfRjKy+Y=
=mvY0
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 06:02:46PM +0100, Kornel Benko wrote:

 state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,

Eh, are you running current CVS ? I fixed this problem some time ago
afaik

Can you find out what Qt::Key_blah type gets generated by pressing it ?

john

-- 
That's just kitten-eating wrong.
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 06:16:17PM +0100, John Levon wrote:

 Can you find out what Qt::Key_blah type gets generated by pressing it ?

Or can you try changing

if (sym.empty()) {
lyxerr[Debug::KEY]  sym empty in getSymbolName()  endl;
sym = text_.latin1();
}

to do sym = none; or something instead ?

john
-- 
That's just kitten-eating wrong.
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 18:16, John Levon wrote:
 On Sun, Oct 13, 2002 at 06:02:46PM +0100, Kornel Benko wrote:
  state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen
  YES,

 Eh, are you running current CVS ? I fixed this problem some time ago
 afaik

It is cvs from today.

 Can you find out what Qt::Key_blah type gets generated by pressing it ?

How?
(I could do some debugging if I were pointed in the correct direction.)

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPampvrewfbDGmeqhAQEItwP6AnLSix27gRcizlW0TxcdZpug/gecnXUk
h+i+Kdy+vgq7KAAkr13G9hEKsSiAB24qgr1O1RBcxFexK37+WiMnQ2hq+AvvkdfC
7aGSce2ubw2pnWiCuFx0H1jJNW5b58NV48hUlPFR5E3JfFLOK+jgmZzIml9XiG7W
OloYa4ralCI=
=eakI
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 06:13:34PM +0100, Kornel Benko wrote:

 How?
 (I could do some debugging if I were pointed in the correct direction.)

see if this fixes it

john


Index: QLyXKeySym.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLyXKeySym.C,v
retrieving revision 1.9
diff -u -r1.9 QLyXKeySym.C
--- QLyXKeySym.C24 Sep 2002 13:57:08 -  1.9
+++ QLyXKeySym.C13 Oct 2002 17:35:56 -
 -61,8 +61,8 
string sym(qkey_to_string(key_));
 
if (sym.empty()) {
-   lyxerr[Debug::KEY]  sym empty in getSymbolName()  endl;
-   sym = text_.latin1();
+   lyxerr[Debug::KEY]  sym empty in getSymbolName() for key   key_ 
+ endl;
+   sym = none;
}
lyxerr[Debug::KEY]  getSymbolName() -   sym  endl;
return sym;

-- 
That's just kitten-eating wrong.
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 18:19, John Levon wrote:
 On Sun, Oct 13, 2002 at 06:16:17PM +0100, John Levon wrote:
  Can you find out what Qt::Key_blah type gets generated by pressing it ?

 Or can you try changing

 if (sym.empty()) {
 lyxerr[Debug::KEY]  sym empty in getSymbolName() 
 endl; sym = text_.latin1();
 }

 to do sym = none; or something instead ?

No crash now, but no ä inserted either. This is the log now:

repainting 118,472 1,20
Press key 4128 text none, ascii 0
getSymbolName() - Shift_L
KeySym is Shift_L
repainting 118,472 1,20
repainting 118,472 1,20
Press key 0 text ä, ascii 228
sym empty in getSymbolName()
getSymbolName() - none
KeySym is none
Empty kbd action (probably composing)

Modify+':' == dead_diaeresis on my keyboard.
This is the key-sequence which should lead to ä:

KeyPress event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737891775, (146,99), root:(150,119),
state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 characters:  

KeyPress event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737892362, (146,99), root:(150,119),
state 0x2010, keycode 47 (keysym 0xfe57, dead_diaeresis), same_screen YES,
XLookupString gives 0 characters:  

KeyRelease event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737892449, (146,99), root:(150,119),
state 0x2010, keycode 47 (keysym 0xfe57, dead_diaeresis), same_screen YES,
XLookupString gives 0 characters:  

KeyRelease event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737892470, (146,99), root:(150,119),
state 0x2010, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 characters:  

KeyPress event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737908220, (146,99), root:(150,119),
state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 characters:  a

KeyRelease event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737908290, (146,99), root:(150,119),
state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 characters:  a


Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPamtq7ewfbDGmeqhAQGZGAP+IL3UQ38tAIrtEo4jN3fkpLG9MTx3iS6r
HU6YAnQrfEgmjKAoqMe+03B5Ma5Q2bRTVB8iD0LFMbjWGOY2754RFyEP0KKZrHS6
AswHwlDR9CKLaGwA2KjToeOuZWJ13rYzxt8ZTcg5IziPmF296eznKWCgj3ADxHPK
amsxWPJEKso=
=UhoD
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 18:36, John Levon wrote:
 see if this fixes it

Unfortunately not so, that I could insert ä

Log:
sym empty in getSymbolName() for key 65535
getSymbolName() - none
KeySym is none
repainting 147,472 1,20
...
Press key 0 text ä, ascii 228
sym empty in getSymbolName() for key 0
getSymbolName() - none
KeySym is none
Empty kbd action (probably composing)
repainting 147,472 1,20
...

Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPamwZbewfbDGmeqhAQGaoQQAxtnqGYKoerkc+yJgGNL/MxyZ1oxQynwE
PySxQV2m9JZ/QDZGZfX6OOncTtwsh2GBzbU9/T1wAmHlZs6bGm6Dmt+9liP0/oei
We0WQbsKq9sYhuqGr3oTWxtbUR3FL4fd+72suyXB8npSBgYpU1iLppaD6pqZDviF
jf9uRieMoaI=
=Hv1Y
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 06:41:57PM +0100, Kornel Benko wrote:

 
 Unfortunately not so, that I could insert ä

Winging it here, but try this.

Index: QLyXKeySym.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLyXKeySym.C,v
retrieving revision 1.9
diff -u -r1.9 QLyXKeySym.C
--- QLyXKeySym.C24 Sep 2002 13:57:08 -  1.9
+++ QLyXKeySym.C13 Oct 2002 18:09:03 -
 -61,8 +61,11 
string sym(qkey_to_string(key_));
 
if (sym.empty()) {
-   lyxerr[Debug::KEY]  sym empty in getSymbolName()  endl;
-   sym = text_.latin1();
+   lyxerr[Debug::KEY]  sym empty in getSymbolName() for key   key_ 
+ endl;
+   if (text_.length())
+   sym = text_.latin1();
+   else
+   sym = none;
}
lyxerr[Debug::KEY]  getSymbolName() -   sym  endl;
return sym;



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 19:10, John Levon wrote:
 Winging it here, but try this.

Its becomming better ... but still no insert.

Log:
Press key 65535 text none, ascii 0
sym empty in getSymbolName() for key 65535
getSymbolName() - none
KeySym is none
repainting ...
Press key 0 text ä, ascii 228
sym empty in getSymbolName() for key 0
getSymbolName() - ä
KeySym is ä
Empty kbd action (probably composing)
repainting ...

Kornel

P.S.
I am composing, but on X-server-side.
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPam3wLewfbDGmeqhAQFXvgP8D41mehEwGRDRNNGgJp36EKqbxcsCGFYn
aB6ObU6gRcFzr/MgAQvvMGjrn8fnEiLn8Pzj2ZorIm4j2WyfKLRMOmp2ETnDZ6ow
WkCYt28r7pS6FV5WKuCaGTpoafKXM9vZmTrLPCdJ7DsuT5WTXljfPZxSkYnCIsz2
m1iY2/WNbh4=
=U+eR
-END PGP SIGNATURE-




Re: Print dialog: missing comma input (was: Lost feature)

2002-10-13 Thread Dekel Tsur

On Fri, Oct 11, 2002 at 04:29:08PM +0200, Lars Gullik Bj?nnes wrote:
 Dekel Tsur [EMAIL PROTECTED] writes:
 
 | It is better to generate a Postscript file that is printer independent (using
 | scalable fonts).
 
 Depends on you objective. If you want best possible output, you
 absolutely want the postscript generated specifically for the printer
 in question.

Not really.
A printer specific postscript file contains bitmap fonts at the printer
resolution that where generated from the metafont source.
A printer independent file contains outline Postscript fonts, which are 
converted to bitmap at the printer resolution when the file is printed
(either by the printer or by ghostscript).

There is no reason to assume that there will be a distinguishable difference
between these two options.



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 19:13, Kornel Benko wrote:
 Its becomming better ... but still no insert.

 Log:
 Press key 65535 text none, ascii 0
 sym empty in getSymbolName() for key 65535
 getSymbolName() - none
 KeySym is none
 repainting ...
 Press key 0 text ä, ascii 228
 sym empty in getSymbolName() for key 0
 getSymbolName() - ä
 KeySym is ä
 Empty kbd action (probably composing)
 repainting ...


Here the same log with the xforms-lyx: (hoping this may help)

Workarea event: KEYBOARD
XWorkArea: Key is `' [0]
XWorkArea: Keysym is `dead_diaeresis' [65111]
Workarea event: KEYBOARD
XWorkArea: Key is `' [0]
XWorkArea: Keysym is `' [0]
Workarea event: KEYBOARD
XWorkArea: Key is `adiaeresis' [228]
XWorkArea: Keysym is `' [0]
Using keysym [B]
Workarea Diff: 3740811238
KeySym is adiaeresis
action first set to [89]
action now set to [89]
Key [action=89][adiaeresis]
LyXFunc::dispatch: action[89] arg[ä]
BufferView::Pimpl::Dispatch: action[89] arg[ä] x[1077599128] y[1077588800] 
button[143215368]
LyXFunc::dispatch: action[89] arg[ä]
Checking if we know [ä]
   no we don't know [ä]
Cannot decode: ä
expose 617x37+0+635
Transition from state 1 to state 1 after input 0
Calling BC refresh()
Transition from state 1 to state 1 after input 0
Calling BC refresh()
dispatch msg is
SelfInsert arg[`ä']
Workarea event: LEAVE

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPam5XLewfbDGmeqhAQEzywP/YbaDhx25tNYhNwFRL0kdXKhNilnos9ni
bdHhkzrW6Lfzu9xOqvI4vuYjWAfWT7TgIEse8dnWwsjHfSE7eUzmgbLqkG6t6GYp
MTi48KYd91RuQ26LAIDjkt6oDMG4pUxdDvKFEdP2VEBV09UG3S6wVi9CmAU6Xq48
kYcstvk57wY=
=vr9W
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 07:13:20PM +0100, Kornel Benko wrote:

 Press key 0 text ä, ascii 228

Qt is so broken. Key 0 is an impossible condition by their own fscking
headers.

Try changing QLyXKeySym :: isOK to always return true.

john

-- 
That's just kitten-eating wrong.
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 19:32, John Levon wrote:
 Try changing QLyXKeySym :: isOK to always return true.

Looks better, but not inserted.
Log:
Press key 65535 text none, ascii 0
sym empty in getSymbolName() for key 65535
getSymbolName() - none
KeySym is none
...
Press key 0 text ä, ascii 228
sym empty in getSymbolName() for key 0
getSymbolName() - ä
KeySym is ä
action first set to [-1]
action now set to [-1]
sym empty in getSymbolName() for key 0
getSymbolName() - ä
Key [action=-1][ä]
Removing modifiers...
Action now set to [-1]
repainting 110,554 1,20

The same is valid for other (dead-)X-modifiers.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPam+N7ewfbDGmeqhAQG4igQAzftyoxXDXj5OCrXAzbVBG9sn8qBahVXJ
JnooujY37yiPHAx3q0FC1T8eVX/aIm2aZ/YnXbibj9zyxPS0fXvkdHGs3SrRQ9ea
jfx7AIW93InxbGkarcBgB1OgsPeaburUDDgd+o5NFANrpw9rnb74zzpWnu1Bf9pe
B3Ap9w8SSGA=
=xyOz
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 07:40:54PM +0100, Kornel Benko wrote:

 getSymbolName() - ä
 Key [action=-1][ä]
 Removing modifiers...
 Action now set to [-1]
 repainting 110,554 1,20
 
 The same is valid for other (dead-)X-modifiers.

I don't understand why it fails for you, but Mode_switch can give me 
ä perfectly in LyX Qt

I get (unpatched CVS) :

Press key 4128 text none, ascii 0
getSymbolName() - Shift_L
KeySym is Shift_L
Press key 196 text ä, ascii 228
getSymbolName() - Adiaeresis
KeySym is Adiaeresis
action first set to [89]
action now set to [89]
getSymbolName() - Adiaeresis
Key [action=89][Adiaeresis]
getISO returning ä
LyXFunc::dispatch: action[89] arg[ä]
BufferView::Pimpl::Dispatch: action[89] arg[ä] x[1079486630]
y[138085624] button[-1073747616]
LyXFunc::dispatch: action[89] arg[ä]
Checking if we know [ä]
   no we don't know [ä]
Cannot decode: ä
dispatch msg is
SelfInsert arg[`ä']

john

-- 
That's just kitten-eating wrong.
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 19:58, John Levon wrote:
 I don't understand why it fails for you, but Mode_switch can give me
 ä perfectly in LyX Qt

I see. Maybe, because you are using QT2 while I am on QT3.
Bad luck for me. I cannot even insert the euro-sign. (Displaying is ok)
(from Xmodmap:
keycode 0x1A =  e   E   EuroSign
)

Log for euro:

Press key 65535 text none, ascii 0
sym empty in getSymbolName() for key 65535
getSymbolName() - none
KeySym is none
repainting ...
Press key 65535 text ?, ascii 0
sym empty in getSymbolName() for key 65535
getSymbolName() - ?
KeySym is ?
...

Sorry for making trouble.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPanDAbewfbDGmeqhAQECSwQAntdb7UD/j5rSlFQ4gc/27PIv/JpwHBd+
Sij9SdhZg61PU4PiX8/32+NogOSInGybmf1bolHzXkWGl8gwbkvNLo2HKZE3CCz+
RwTg47wTYm49bgYj1h+pIZoj3ds9l9ktLXN71UIqKED8kn/lZGFpB20EEQn/YJ5Y
8d56EiBzJ6I=
=4D7F
-END PGP SIGNATURE-




Patch: mathed build-in macros

2002-10-13 Thread Dekel Tsur

Try writing \hookrightarrow in mathed without having the type1 symbol fonts.
The result is weird: lhook -.
The following patch fixes this - it makes mathed behave the same as in 1.2.x.


Index: src/mathed/math_factory.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_factory.C,v
retrieving revision 1.63
diff -u -p -r1.63 math_factory.C
--- src/mathed/math_factory.C   20 Sep 2002 12:36:36 -  1.63
+++ src/mathed/math_factory.C   13 Oct 2002 22:01:13 -
 -94,22 +94,37  void initSymbols()
 
std::ifstream fs(filename.c_str());
string line;
+   bool disable = false;
while (std::getline(fs, line)) {
int charid = 0;
int fallbackid = 0;
-   latexkeys tmp;
if (line.size()  0  line[0] == '#')
continue;
 
+   // special case of \iffont / \fi
+   if (line.size() = 7  line.substr(0, 7) == \\iffont) {
+   istringstream is(line);
+   string tmp;
+   is  tmp;
+   is  tmp;
+   disable = !math_font_available(tmp);
+   continue;
+   } else if (line.size() = 3  line.substr(0, 3) == \\fi) {
+   disable = false;
+   continue;
+   }
+
// special case of pre-defined macros
if (line.size()  8  line.substr(0, 5) == \\def\\) {
//lyxerr  defining: '  line  '\n;
istringstream is(line);
-   MathMacroTable::create(MathAtom(new MathMacroTemplate(is)));
+   if (!disable)
+   MathMacroTable::create(MathAtom(new 
+MathMacroTemplate(is)));
continue;
}
 
istringstream is(line);
+   latexkeys tmp;
is  tmp.name  tmp.inset;
if (isFontName(tmp.inset)) 
is  charid  fallbackid  tmp.extra  tmp.xmlname;
Index: lib/symbols
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/symbols,v
retrieving revision 1.31
diff -u -p -r1.31 symbols
--- lib/symbols 19 Sep 2002 13:44:48 -  1.31
+++ lib/symbols 13 Oct 2002 22:01:13 -
 -762,24 +762,32  $  mathnormal0   0 s
 #
 # pre-defined macros
 #
-
-\def\longleftrightarrow{\leftarrow\kern-2mm\rightarrow} 
-\def\Longleftrightarrow{\Leftarrow\kern-2mm\Rightarrow}
+\def\longleftrightarrow{\leftarrow\kern-8mm\rightarrow} 
+\def\Longleftrightarrow{\Leftarrow\kern-8mm\Rightarrow}
 \def\doteq{\stackrel{\cdot}{\=}}
-\def\longrightarrow{\lyxbar\kern-2mm\rightarrow}
-\def\longleftarrow{\leftarrow\kern-2mm\lyxbar}
-\def\mapsto{\mapstochar\kern-2mm\rightarrow}
-\def\longmapsto{\mapstochar\kern-2mm\lyxbar\kern-6mu\rightarrow}
-\def\Longrightarrow{\lyxeq\kern-2mm\Rightarrow}
-\def\Longleftarrow{\Leftarrow\kern-2mm\lyxeq}
-\def\models{\vert\kern-2mm\lyxeq}
-\def\hookrightarrow{\lhook\kern-2mm\rightarrow}
-\def\hookleftarrow{\leftarrow\kern-2mm\rhook}
+
+\iffont cmsy
+\def\longrightarrow{\lyxbar\kern-6mm\rightarrow}
+\def\longleftarrow{\leftarrow\kern-6mm\lyxbar}
+\def\mapsto{\mapstochar\kern-4mm\rightarrow}
+\def\longmapsto{\mapstochar\kern-3mm\lyxbar\kern-6mu\rightarrow}
+\def\Longrightarrow{\lyxeq\kern-5mm\Rightarrow}
+\def\Longleftarrow{\Leftarrow\kern-5mm\lyxeq}
+\def\models{\vert\kern-3mm\lyxeq}
+\fi
+\iffont cmm
+\def\hookrightarrow{\lhook\kern-8mm\rightarrow}
+\def\hookleftarrow{\leftarrow\kern-8mm\rhook}
 \def\bowtie{\triangleright\kern-2mm\triangleleft}
+\fi
+\iffont msa
 \def\dashrightarrow{\lyxdabar\lyxdabar\lyxright}
 \def\dashleftarrow{\lyxleft\lyxdabar\lyxdabar}
 \def\dasharrow{\dashrightarrow}
-\def\Join{\ltimes\kern-2mm\rtimes}
+\fi
+\iffont msb
+\def\Join{\ltimes\kern-12mm\rtimes}
+\fi
 \def\mathcircumflex{\mbox{\^{}}}
 
 neqlyxsymbol 185 0 mathrel  x



Re: Patch: Implement qfont_loader::available

2002-10-13 Thread John Levon

On Sat, Oct 12, 2002 at 04:43:24PM +0200, Dekel Tsur wrote:

> The attached patch fixes this.
> OK to apply ?

Have you tested this in both cases ?

> + return getfontinfo(f)->font.exactMatch();

Won't this return a false negative if the font *size* didn't match
exactly ? Aren't we only concerned with the face ?

regards
john

-- 
"That's just kitten-eating wrong."
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Saturday 12 October 2002 20:38, Dekel Tsur wrote:
> Since, QT uses unicode internally, we should use that.
> This patch allow displaying of non iso8859-1 chars.
> Please test.

I am unable to display the euro symbols (with or without this patch)
with the qt-version.
(The xforms-version is ok in using iso8859-15 screen-coding)

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPalS2rewfbDGmeqhAQHtuAQA2LrqA7WkOFv6U7irtawkstFgeeNjlE72
d0u5nxDGHlpQIQbVf5VWiDvlxxrc0WMHq0Figxu44euTio+AuvKD5h/mLBSPcRs3
pOGeQyRotTfs2WNzk4R9poR2Bs1ezbTyb21Eg6iRXPXKUcMoYnsuUW+JdxcnpRac
hewcsp8p3Cw=
=0wdF
-END PGP SIGNATURE-



qt.gif
Description: GIF image


xforms.gif
Description: GIF image


Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 12:52, Dekel Tsur wrote:
> This is because the lib/languages file does not instruct to use the
> iso8859-15 encoding for your language.
> Just edit the file, and replace the current encoding for your language
> by iso8859-15.

This helped. But why are the preferences not used?

\screen_font_encoding "iso8859-15"

...
> PS: Should we replace all occurrences of iso8859-1 by iso8859-15 ?

I vote for it. But for me it is sufficient to set it in preferences.

What hurts me more is:
as soon, as i press the modify-key (e.g. to enter "ä" on a us-keyboard) lyx blows away.
The relevant backtrace:

#3  0x083d653b in Letext () at abort.C:9
#4  0x0811fe76 in error_handler (err_sig=11) at ../src/lyx_main.C:202
#5  
#6  0x08302669 in QLyXKeySym::getSymbolName (this=0x8889ff0)
at /usr/include/g++/std/bastring.h:220
#7  0x0813a21f in LyXFunc::processKeySym (this=0xbfffe1c4, keysym=0xbfffe1c4,
state=none) at lyxfunc.C:163
#8  0x08065cfb in BufferView::Pimpl::workAreaKeyPress (this=0x87f4cb0, key=
{px = 0xbfffe21c, pn = {pi_ = 0x0}}, state=none)
at BufferView_pimpl.C:406
#9  0x08404158 in 
boost::detail::function::void_function_obj_invoker2, boost::_bi::list3, boost::arg<2> > >, void, boost::shared_ptr, 
key_modifier::state>::invoke (function_obj_ptr=
  {obj_ptr = 0x87ede20, const_obj_ptr = 0x87ede20, func_ptr = 0x87ede20},
a0=0xbfffe2dc, a1=none) at ../boost/boost/bind/mem_fn_template.hpp:213
#10 0x0849fbbc in boost::signal2 >::operator() (
this=0x87f4dc0, a1=0xbfffe3d4, a2=none)
at ../../../boost/boost/function/function_template.hpp:328
#11 0x083b54c7 in QContentPane::keyPressEvent (this=0x87f59e0, e=0xbfffe630)
at QContentPane.C:142
#12 0x40248580 in QWidget::event () from /usr/lib/qt3/lib/libqt.so.3
#13 0x401c4966 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt.so.3

This is the output from lyx:
...
repainting 118,430 1,20
repainting 118,430 1,20
repainting 118,430 1,20
Press key 65535 text "none", ascii "0"
sym empty in getSymbolName()

lyx: SIGSEGV signal caught
...
Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPalj+rewfbDGmeqhAQGl1QP+NBD/kle1SXV+m7EABnq9CGgkJgbD5i+J
cs/o3CxrnTNimzt4ibn3447s6ZZdjMeF3dwFdOs9i1rtsJJCPoFvcBJPeU39jYgK
mLiphpl/UhHT4rYx/My0SNRbes09fNgroagQoeOj4iuq3n8TlCkHaZOaeCdrMvgq
36DIEntwyWg=
=Mg7P
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 12:49, Philipp Reichmuth wrote:
> DT> Since, QT uses unicode internally, we should use that.
>
> Unicode support in Qt 2.1 is *bad*, and even 3 has some problems. I'm
> not sure about RTL scripts, for example. At least for Qt 2.1 and Qt
> for Windows, this could mean some serious working around trouble for
> Hebrew and Arabic.

QT3 here, I am not using Hebrew  or Arabic.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPalmNLewfbDGmeqhAQHFFQP+LBxCzfjU9rSO4Rqw2AhqdI219XnIhzYk
N1PwHKHiSp6RgmWua/QLgT46EWBqWNlx/6PMUHUZBMFBrr08CABkKhJueAlsohFP
cqMCMO6ZpWLVcuEmBz50qXTmZkJRr88nO0tPYSMmSWtM7xF+IbM02ebFX6moET4N
ZBfJgYlOpBo=
=EeZK
-END PGP SIGNATURE-




全市最便宜的市话通120元 请电26138636

2002-10-13 Thread yang

È«ÊÐ×î±ãÒ˵ÄÊл°Í¨120Ôª Çëµç26138636  


Re: Patch: Implement qfont_loader::available

2002-10-13 Thread Dekel Tsur

On Sat, Oct 12, 2002 at 04:53:08PM +0100, John Levon wrote:
> On Sat, Oct 12, 2002 at 04:43:24PM +0200, Dekel Tsur wrote:
> 
> > The attached patch fixes this.
> > OK to apply ?
> 
> Have you tested this in both cases ?

Yes.

> > +   return getfontinfo(f)->font.exactMatch();
> 
> Won't this return a false negative if the font *size* didn't match
> exactly ? Aren't we only concerned with the face ?

I checked and it exactMatch() considers only the family.
In any case, we only use it for the Type1 math fonts, which are scalable.



Re: Patch: unicode support in qt painter

2002-10-13 Thread Philipp Reichmuth


DT> Since, QT uses unicode internally, we should use that.

Unicode support in Qt 2.1 is *bad*, and even 3 has some problems. I'm
not sure about RTL scripts, for example. At least for Qt 2.1 and Qt
for Windows, this could mean some serious working around trouble for
Hebrew and Arabic.

Philipp




Re: Patch: unicode support in qt painter

2002-10-13 Thread Dekel Tsur

On Sun, Oct 13, 2002 at 12:02:44PM +0100, Kornel Benko wrote:
> On Saturday 12 October 2002 20:38, Dekel Tsur wrote:
> > Since, QT uses unicode internally, we should use that.
> > This patch allow displaying of non iso8859-1 chars.
> > Please test.
> 
> I am unable to display the euro symbols (with or without this patch)
> with the qt-version.
> (The xforms-version is ok in using iso8859-15 screen-coding)

This is because the lib/languages file does not instruct to use the 
iso8859-15 encoding for your language.
Just edit the file, and replace the current encoding for your language
by iso8859-15.

PS: Should we replace all occurrences of iso8859-1 by iso8859-15 ?



Patch: unicode support in qt painter

2002-10-13 Thread Dekel Tsur

Since, QT uses unicode internally, we should use that.
This patch allow displaying of non iso8859-1 chars.
Please test.



patch.gz
Description: Binary data


Re: Patch: unicode support in qt painter

2002-10-13 Thread Dekel Tsur

On Sun, Oct 13, 2002 at 01:49:12PM +0200, Philipp Reichmuth wrote:
> 
> DT> Since, QT uses unicode internally, we should use that.
> 
> Unicode support in Qt 2.1 is *bad*, and even 3 has some problems. I'm
> not sure about RTL scripts, for example. At least for Qt 2.1 and Qt
> for Windows, this could mean some serious working around trouble for
> Hebrew and Arabic.

We do not rely on QT code for Hebrew & Arabic- we use our own.
We just need the ability to access all the Unicode characters.




Type1 math fonts & use_scalable_fonts

2002-10-13 Thread Dekel Tsur

If use_scalable_false is false, then LyX displays the type1 math fonts at 12
points, regardless of the size they should be.

The cause for this problem is as follows: 
  XListFonts(...,"-*-cmsy-*-*-*-*-*-*-*-*-*-*-*-*",...)
return *2* matches, 
-bluesky-cmsy-medium-r-normal--0-0-0-0-m-0-adobe-fontspecific
-bluesky-cmsy-medium-r-normal--12-120-75-75-m-0-adobe-fontspecific

The 2nd match is "correct" while the 1st one is "wrong" 
(as the font is scalable).

The font is recognized as scalable in FontInfo::query.
However, in FontInfo::getFontname, the first match causes closestind
to be not equal to -1, and therefore, the conditional
   if (scalable && (lyxrc.use_scalable_fonts || closestind == -1))
is not satisfied, and therefore the font is not scaled.
There are several possible solutions:

1. Call XListFonts(...,"-*-cmsy-*",...) which only gives the "correct" match.
This works on xfree but may not be portable:
http://marc.theaimsgroup.com/?l=lyx-devel=102748076625757=2

2. Ignore matches whose 12th field is zero, while its 7th field is non-zero:
@@ -143,6 +144,9 @@ void FontInfo::query()
}
scalable = true;
};
+   if (sizes[i] > 0 &&
+   lyx::atoi(token(name, '-', 12)) == 0)
+   sizes[i] = 0;
};
XFreeFontNames(list);
}

3. Change the if statement above to

@@ -51,7 +51,8 @@ string const FontInfo::getFontname(int s
}
}
 
-   if (scalable && (lyxrc.use_scalable_fonts || closestind == -1)) {
+   if (scalable && (lyxrc.use_scalable_fonts || closestind == -1
+|| error/size > 0.2)) {
// We can use scalable
string const font = resize(strings[scaleindex], size);
lyxerr[Debug::FONT] << "Using scalable font to get\n"

This means that if use_scalable_fonts is false, but the size of closest
available bitmap font is not close enough, we still prefer to rescale the
font.
Note that this change can be made even if (1) or (2) are also applied.
Clearly, if I have, for example, the font Times as a bitmap font at sizes
14,17,20, and as an outline(scalable) font, and I want a font of size 30 on
screen, it is preferable to use the scalable font over the 20pt bitmap font.
In fact, the 0.2 can be replaced by a lyxrc variable scalable_font_threshold
and the use_scalable_fonts can be removed
(use_scalable_fonts=true is equivalent to having scalable_font_threshold=0).

Note: The description of the use_scalable_fonts in the preferences dialog is
not accurate.
What this variable means is as follows:
* use_scalable_fonts=false: If the font available as both bitmap and as an
  outline (scalable) font, prefer the bitmap font.
* use_scalable_fonts=true:  If the font available as both bitmap and as an
  outline font, prefer the scalable font.









Suggestion for the QT frontend preferences dialog

2002-10-13 Thread Dekel Tsur

Few suggestions:

- The "Screen Fonts->Rescale bitmap fonts" button should not be implemented
(not used by the QT frontend).

- The "Screen Fonts->Encoding" field should not be implemented
(not used by the QT frontend).

- The "Printer->Printer commands and flags" buttons should not be implemented.
It is possible that we will decide to remove the printer code in the future.



Re: UI question about multiline formulas

2002-10-13 Thread Gady Kozma

>What is "the previous behaviour"? Some magic like that has been in for
>ages.

The 1.1.6 behavior was to put everything in the leftmost column and let the 
user move things about with ctrl-tabs. What do you mean when you say "some 
magic"?

My question was more in the patch level: what kind of solution to my problem 
would you accept if I do it? It was not on a user level, of course you can 
always cut and paste to make the equation look OK.

Gady

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




Re: Patch: Implement qfont_loader::available

2002-10-13 Thread John Levon

On Sat, Oct 12, 2002 at 09:28:04PM +0200, Dekel Tsur wrote:

> > Won't this return a false negative if the font *size* didn't match
> > exactly ? Aren't we only concerned with the face ?
> 
> I checked and it exactMatch() considers only the family.
> In any case, we only use it for the Type1 math fonts, which are scalable.

Super, thanks.

john

-- 
"That's just kitten-eating wrong."
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 01:15:54PM +0100, Kornel Benko wrote:

> as soon, as i press the modify-key (e.g. to enter "ä" on a us-keyboard) lyx blows 
>away.
> The relevant backtrace:

Run "xev" and tell us the output when you press your modify key

regards
john



XML file format status

2002-10-13 Thread Torsten Bronger

Halloechen!

I've read that the LyX developer take into
consideration to use an XML based file format
for the documents.

Can anybody give ma a concise status of this plan?
Or is there already an internet reference?

Thank you!

Tschoe,
Torsten.



!realcut and multiple par delete

2002-10-13 Thread John Levon


If we are cutting multiple pars, the pars are excised from the par list
and "buf" in CutAndPaste.C is set to point to them. They are finally
deleted when the next operation resets "buf".

Now if we are deleting (!realcut) we don't seem to set buf, and the
paragraphs that are removed fall through the floor. Where have I misread
? (1.2 source btw)

john
-- 
"That's just kitten-eating wrong."
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 17:11, John Levon wrote:
> On Sun, Oct 13, 2002 at 01:15:54PM +0100, Kornel Benko wrote:
> > as soon, as i press the modify-key (e.g. to enter "ä" on a us-keyboard)
> > lyx blows away. The relevant backtrace:
>
> Run "xev" and tell us the output when you press your modify key

KeyPress event, serial 27, synthetic NO, window 0x2c1,
root 0x36, subw 0x0, time 3736299322, (101,167), root:(105,187),
state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 characters:  ""

Hope this helps.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPamnPLewfbDGmeqhAQGEfQQAyUlju3yKBnShxy3xFzrqgeWAPdg08JUw
6qJ6ECWgA9+PoG/ZBLZcLFcjPYibZNEt4yPyxyX6UxDEH7G14jDkSthiPtNChB2Z
BNH5svj/59aEdMODstPrD/6iH9rCQtoEOWZjGSX6TgTlc7lVmCYyZTR//GKfWv5w
EUqYfRjKy+Y=
=mvY0
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 06:02:46PM +0100, Kornel Benko wrote:

> state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,

Eh, are you running current CVS ? I fixed this problem some time ago
afaik

Can you find out what Qt::Key_blah type gets generated by pressing it ?

john

-- 
"That's just kitten-eating wrong."
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 06:16:17PM +0100, John Levon wrote:

> Can you find out what Qt::Key_blah type gets generated by pressing it ?

Or can you try changing

if (sym.empty()) {
lyxerr[Debug::KEY] << "sym empty in getSymbolName()" << endl;
sym = text_.latin1();
}

to do sym = "none"; or something instead ?

john
-- 
"That's just kitten-eating wrong."
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 18:16, John Levon wrote:
> On Sun, Oct 13, 2002 at 06:02:46PM +0100, Kornel Benko wrote:
> > state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen
> > YES,
>
> Eh, are you running current CVS ? I fixed this problem some time ago
> afaik

It is cvs from today.

> Can you find out what Qt::Key_blah type gets generated by pressing it ?

How?
(I could do some debugging if I were pointed in the correct direction.)

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPampvrewfbDGmeqhAQEItwP6AnLSix27gRcizlW0TxcdZpug/gecnXUk
h+i+Kdy+vgq7KAAkr13G9hEKsSiAB24qgr1O1RBcxFexK37+WiMnQ2hq+AvvkdfC
7aGSce2ubw2pnWiCuFx0H1jJNW5b58NV48hUlPFR5E3JfFLOK+jgmZzIml9XiG7W
OloYa4ralCI=
=eakI
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 06:13:34PM +0100, Kornel Benko wrote:

> How?
> (I could do some debugging if I were pointed in the correct direction.)

see if this fixes it

john


Index: QLyXKeySym.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLyXKeySym.C,v
retrieving revision 1.9
diff -u -r1.9 QLyXKeySym.C
--- QLyXKeySym.C24 Sep 2002 13:57:08 -  1.9
+++ QLyXKeySym.C13 Oct 2002 17:35:56 -
@@ -61,8 +61,8 @@
string sym(qkey_to_string(key_));
 
if (sym.empty()) {
-   lyxerr[Debug::KEY] << "sym empty in getSymbolName()" << endl;
-   sym = text_.latin1();
+   lyxerr[Debug::KEY] << "sym empty in getSymbolName() for key " << key_ 
+<< endl;
+   sym = "none";
}
lyxerr[Debug::KEY] << "getSymbolName() -> " << sym << endl;
return sym;

-- 
"That's just kitten-eating wrong."
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 18:19, John Levon wrote:
> On Sun, Oct 13, 2002 at 06:16:17PM +0100, John Levon wrote:
> > Can you find out what Qt::Key_blah type gets generated by pressing it ?
>
> Or can you try changing
>
> if (sym.empty()) {
> lyxerr[Debug::KEY] << "sym empty in getSymbolName()" <<
> endl; sym = text_.latin1();
> }
>
> to do sym = "none"; or something instead ?

No crash now, but no "ä" inserted either. This is the log now:

repainting 118,472 1,20
Press key 4128 text "none", ascii "0"
getSymbolName() -> Shift_L
KeySym is Shift_L
repainting 118,472 1,20
repainting 118,472 1,20
Press key 0 text "ä", ascii "228"
sym empty in getSymbolName()
getSymbolName() -> none
KeySym is none
Empty kbd action (probably composing)

Modify+':' == dead_diaeresis on my keyboard.
This is the key-sequence which should lead to "ä":

KeyPress event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737891775, (146,99), root:(150,119),
state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 characters:  ""

KeyPress event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737892362, (146,99), root:(150,119),
state 0x2010, keycode 47 (keysym 0xfe57, dead_diaeresis), same_screen YES,
XLookupString gives 0 characters:  ""

KeyRelease event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737892449, (146,99), root:(150,119),
state 0x2010, keycode 47 (keysym 0xfe57, dead_diaeresis), same_screen YES,
XLookupString gives 0 characters:  ""

KeyRelease event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737892470, (146,99), root:(150,119),
state 0x2010, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
XLookupString gives 0 characters:  ""

KeyPress event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737908220, (146,99), root:(150,119),
state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 characters:  "a"

KeyRelease event, serial 27, synthetic NO, window 0x321,
root 0x36, subw 0x0, time 3737908290, (146,99), root:(150,119),
state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 characters:  "a"


Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPamtq7ewfbDGmeqhAQGZGAP+IL3UQ38tAIrtEo4jN3fkpLG9MTx3iS6r
HU6YAnQrfEgmjKAoqMe+03B5Ma5Q2bRTVB8iD0LFMbjWGOY2754RFyEP0KKZrHS6
AswHwlDR9CKLaGwA2KjToeOuZWJ13rYzxt8ZTcg5IziPmF296eznKWCgj3ADxHPK
amsxWPJEKso=
=UhoD
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 18:36, John Levon wrote:
> see if this fixes it

Unfortunately not so, that I could insert "ä"

Log:
sym empty in getSymbolName() for key 65535
getSymbolName() -> none
KeySym is none
repainting 147,472 1,20
...
Press key 0 text "ä", ascii "228"
sym empty in getSymbolName() for key 0
getSymbolName() -> none
KeySym is none
Empty kbd action (probably composing)
repainting 147,472 1,20
...

Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPamwZbewfbDGmeqhAQGaoQQAxtnqGYKoerkc+yJgGNL/MxyZ1oxQynwE
PySxQV2m9JZ/QDZGZfX6OOncTtwsh2GBzbU9/T1wAmHlZs6bGm6Dmt+9liP0/oei
We0WQbsKq9sYhuqGr3oTWxtbUR3FL4fd+72suyXB8npSBgYpU1iLppaD6pqZDviF
jf9uRieMoaI=
=Hv1Y
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 06:41:57PM +0100, Kornel Benko wrote:

> 
> Unfortunately not so, that I could insert "ä"

Winging it here, but try this.

Index: QLyXKeySym.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLyXKeySym.C,v
retrieving revision 1.9
diff -u -r1.9 QLyXKeySym.C
--- QLyXKeySym.C24 Sep 2002 13:57:08 -  1.9
+++ QLyXKeySym.C13 Oct 2002 18:09:03 -
@@ -61,8 +61,11 @@
string sym(qkey_to_string(key_));
 
if (sym.empty()) {
-   lyxerr[Debug::KEY] << "sym empty in getSymbolName()" << endl;
-   sym = text_.latin1();
+   lyxerr[Debug::KEY] << "sym empty in getSymbolName() for key " << key_ 
+<< endl;
+   if (text_.length())
+   sym = text_.latin1();
+   else
+   sym = "none";
}
lyxerr[Debug::KEY] << "getSymbolName() -> " << sym << endl;
return sym;



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 19:10, John Levon wrote:
> Winging it here, but try this.

Its becomming better ... but still no insert.

Log:
Press key 65535 text "none", ascii "0"
sym empty in getSymbolName() for key 65535
getSymbolName() -> none
KeySym is none
repainting ...
Press key 0 text "ä", ascii "228"
sym empty in getSymbolName() for key 0
getSymbolName() -> ä
KeySym is ä
Empty kbd action (probably composing)
repainting ...

Kornel

P.S.
I am composing, but on X-server-side.
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPam3wLewfbDGmeqhAQFXvgP8D41mehEwGRDRNNGgJp36EKqbxcsCGFYn
aB6ObU6gRcFzr/MgAQvvMGjrn8fnEiLn8Pzj2ZorIm4j2WyfKLRMOmp2ETnDZ6ow
WkCYt28r7pS6FV5WKuCaGTpoafKXM9vZmTrLPCdJ7DsuT5WTXljfPZxSkYnCIsz2
m1iY2/WNbh4=
=U+eR
-END PGP SIGNATURE-




Re: Print dialog: missing comma input (was: Lost feature)

2002-10-13 Thread Dekel Tsur

On Fri, Oct 11, 2002 at 04:29:08PM +0200, Lars Gullik Bj?nnes wrote:
> Dekel Tsur <[EMAIL PROTECTED]> writes:
> 
> | It is better to generate a Postscript file that is printer independent (using
> | scalable fonts).
> 
> Depends on you objective. If you want best possible output, you
> absolutely want the postscript generated specifically for the printer
> in question.

Not really.
A printer specific postscript file contains bitmap fonts at the printer
resolution that where generated from the metafont source.
A printer independent file contains outline Postscript fonts, which are 
converted to bitmap at the printer resolution when the file is printed
(either by the printer or by ghostscript).

There is no reason to assume that there will be a distinguishable difference
between these two options.



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 19:13, Kornel Benko wrote:
> Its becomming better ... but still no insert.
>
> Log:
> Press key 65535 text "none", ascii "0"
> sym empty in getSymbolName() for key 65535
> getSymbolName() -> none
> KeySym is none
> repainting ...
> Press key 0 text "ä", ascii "228"
> sym empty in getSymbolName() for key 0
> getSymbolName() -> ä
> KeySym is ä
> Empty kbd action (probably composing)
> repainting ...


Here the same log with the xforms-lyx: (hoping this may help)

Workarea event: KEYBOARD
XWorkArea: Key is `' [0]
XWorkArea: Keysym is `dead_diaeresis' [65111]
Workarea event: KEYBOARD
XWorkArea: Key is `' [0]
XWorkArea: Keysym is `' [0]
Workarea event: KEYBOARD
XWorkArea: Key is `adiaeresis' [228]
XWorkArea: Keysym is `' [0]
Using keysym [B]
Workarea Diff: 3740811238
KeySym is adiaeresis
action first set to [89]
action now set to [89]
Key [action=89][adiaeresis]
LyXFunc::dispatch: action[89] arg[ä]
BufferView::Pimpl::Dispatch: action[89] arg[ä] x[1077599128] y[1077588800] 
button[143215368]
LyXFunc::dispatch: action[89] arg[ä]
Checking if we know [ä]
   no we don't know [ä]
Cannot decode: ä
expose 617x37+0+635
Transition from state 1 to state 1 after input 0
Calling BC refresh()
Transition from state 1 to state 1 after input 0
Calling BC refresh()
dispatch msg is
SelfInsert arg[`ä']
Workarea event: LEAVE

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPam5XLewfbDGmeqhAQEzywP/YbaDhx25tNYhNwFRL0kdXKhNilnos9ni
bdHhkzrW6Lfzu9xOqvI4vuYjWAfWT7TgIEse8dnWwsjHfSE7eUzmgbLqkG6t6GYp
MTi48KYd91RuQ26LAIDjkt6oDMG4pUxdDvKFEdP2VEBV09UG3S6wVi9CmAU6Xq48
kYcstvk57wY=
=vr9W
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 07:13:20PM +0100, Kornel Benko wrote:

> Press key 0 text "ä", ascii "228"

Qt is so broken. Key 0 is an impossible condition by their own fscking
headers.

Try changing QLyXKeySym :: isOK to always return true.

john

-- 
"That's just kitten-eating wrong."
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 19:32, John Levon wrote:
> Try changing QLyXKeySym :: isOK to always return true.

Looks better, but not inserted.
Log:
Press key 65535 text "none", ascii "0"
sym empty in getSymbolName() for key 65535
getSymbolName() -> none
KeySym is none
...
Press key 0 text "ä", ascii "228"
sym empty in getSymbolName() for key 0
getSymbolName() -> ä
KeySym is ä
action first set to [-1]
action now set to [-1]
sym empty in getSymbolName() for key 0
getSymbolName() -> ä
Key [action=-1][ä]
Removing modifiers...
Action now set to [-1]
repainting 110,554 1,20

The same is valid for other (dead-)X-modifiers.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPam+N7ewfbDGmeqhAQG4igQAzftyoxXDXj5OCrXAzbVBG9sn8qBahVXJ
JnooujY37yiPHAx3q0FC1T8eVX/aIm2aZ/YnXbibj9zyxPS0fXvkdHGs3SrRQ9ea
jfx7AIW93InxbGkarcBgB1OgsPeaburUDDgd+o5NFANrpw9rnb74zzpWnu1Bf9pe
B3Ap9w8SSGA=
=xyOz
-END PGP SIGNATURE-




Re: Patch: unicode support in qt painter

2002-10-13 Thread John Levon

On Sun, Oct 13, 2002 at 07:40:54PM +0100, Kornel Benko wrote:

> getSymbolName() -> ä
> Key [action=-1][ä]
> Removing modifiers...
> Action now set to [-1]
> repainting 110,554 1,20
> 
> The same is valid for other (dead-)X-modifiers.

I don't understand why it fails for you, but Mode_switch can give me 
ä perfectly in LyX Qt

I get (unpatched CVS) :

Press key 4128 text "none", ascii "0"
getSymbolName() -> Shift_L
KeySym is Shift_L
Press key 196 text "ä", ascii "228"
getSymbolName() -> Adiaeresis
KeySym is Adiaeresis
action first set to [89]
action now set to [89]
getSymbolName() -> Adiaeresis
Key [action=89][Adiaeresis]
getISO returning ä
LyXFunc::dispatch: action[89] arg[ä]
BufferView::Pimpl::Dispatch: action[89] arg[ä] x[1079486630]
y[138085624] button[-1073747616]
LyXFunc::dispatch: action[89] arg[ä]
Checking if we know [ä]
   no we don't know [ä]
Cannot decode: ä
dispatch msg is
SelfInsert arg[`ä']

john

-- 
"That's just kitten-eating wrong."
- Richard Henderson



Re: Patch: unicode support in qt painter

2002-10-13 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Sunday 13 October 2002 19:58, John Levon wrote:
> I don't understand why it fails for you, but Mode_switch can give me
> ä perfectly in LyX Qt

I see. Maybe, because you are using QT2 while I am on QT3.
Bad luck for me. I cannot even insert the euro-sign. (Displaying is ok)
(from Xmodmap:
keycode 0x1A =  e   E   EuroSign
)

Log for euro:

Press key 65535 text "none", ascii "0"
sym empty in getSymbolName() for key 65535
getSymbolName() -> none
KeySym is none
repainting ...
Press key 65535 text "?", ascii "0"
sym empty in getSymbolName() for key 65535
getSymbolName() -> ?
KeySym is ?
...

Sorry for making trouble.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPanDAbewfbDGmeqhAQECSwQAntdb7UD/j5rSlFQ4gc/27PIv/JpwHBd+
Sij9SdhZg61PU4PiX8/32+NogOSInGybmf1bolHzXkWGl8gwbkvNLo2HKZE3CCz+
RwTg47wTYm49bgYj1h+pIZoj3ds9l9ktLXN71UIqKED8kn/lZGFpB20EEQn/YJ5Y
8d56EiBzJ6I=
=4D7F
-END PGP SIGNATURE-




Patch: mathed build-in macros

2002-10-13 Thread Dekel Tsur

Try writing \hookrightarrow in mathed without having the type1 symbol fonts.
The result is weird: "lhook ->".
The following patch fixes this - it makes mathed behave the same as in 1.2.x.


Index: src/mathed/math_factory.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_factory.C,v
retrieving revision 1.63
diff -u -p -r1.63 math_factory.C
--- src/mathed/math_factory.C   20 Sep 2002 12:36:36 -  1.63
+++ src/mathed/math_factory.C   13 Oct 2002 22:01:13 -
@@ -94,22 +94,37 @@ void initSymbols()
 
std::ifstream fs(filename.c_str());
string line;
+   bool disable = false;
while (std::getline(fs, line)) {
int charid = 0;
int fallbackid = 0;
-   latexkeys tmp;
if (line.size() > 0 && line[0] == '#')
continue;
 
+   // special case of \iffont / \fi
+   if (line.size() >= 7 && line.substr(0, 7) == "\\iffont") {
+   istringstream is(line);
+   string tmp;
+   is >> tmp;
+   is >> tmp;
+   disable = !math_font_available(tmp);
+   continue;
+   } else if (line.size() >= 3 && line.substr(0, 3) == "\\fi") {
+   disable = false;
+   continue;
+   }
+
// special case of pre-defined macros
if (line.size() > 8 && line.substr(0, 5) == "\\def\\") {
//lyxerr << "defining: '" << line << "'\n";
istringstream is(line);
-   MathMacroTable::create(MathAtom(new MathMacroTemplate(is)));
+   if (!disable)
+   MathMacroTable::create(MathAtom(new 
+MathMacroTemplate(is)));
continue;
}
 
istringstream is(line);
+   latexkeys tmp;
is >> tmp.name >> tmp.inset;
if (isFontName(tmp.inset)) 
is >> charid >> fallbackid >> tmp.extra >> tmp.xmlname;
Index: lib/symbols
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/symbols,v
retrieving revision 1.31
diff -u -p -r1.31 symbols
--- lib/symbols 19 Sep 2002 13:44:48 -  1.31
+++ lib/symbols 13 Oct 2002 22:01:13 -
@@ -762,24 +762,32 @@ $  mathnormal0   0 s
 #
 # pre-defined macros
 #
-
-\def\longleftrightarrow{\leftarrow\kern-2mm\rightarrow} 
-\def\Longleftrightarrow{\Leftarrow\kern-2mm\Rightarrow}
+\def\longleftrightarrow{\leftarrow\kern-8mm\rightarrow} 
+\def\Longleftrightarrow{\Leftarrow\kern-8mm\Rightarrow}
 \def\doteq{\stackrel{\cdot}{\=}}
-\def\longrightarrow{\lyxbar\kern-2mm\rightarrow}
-\def\longleftarrow{\leftarrow\kern-2mm\lyxbar}
-\def\mapsto{\mapstochar\kern-2mm\rightarrow}
-\def\longmapsto{\mapstochar\kern-2mm\lyxbar\kern-6mu\rightarrow}
-\def\Longrightarrow{\lyxeq\kern-2mm\Rightarrow}
-\def\Longleftarrow{\Leftarrow\kern-2mm\lyxeq}
-\def\models{\vert\kern-2mm\lyxeq}
-\def\hookrightarrow{\lhook\kern-2mm\rightarrow}
-\def\hookleftarrow{\leftarrow\kern-2mm\rhook}
+
+\iffont cmsy
+\def\longrightarrow{\lyxbar\kern-6mm\rightarrow}
+\def\longleftarrow{\leftarrow\kern-6mm\lyxbar}
+\def\mapsto{\mapstochar\kern-4mm\rightarrow}
+\def\longmapsto{\mapstochar\kern-3mm\lyxbar\kern-6mu\rightarrow}
+\def\Longrightarrow{\lyxeq\kern-5mm\Rightarrow}
+\def\Longleftarrow{\Leftarrow\kern-5mm\lyxeq}
+\def\models{\vert\kern-3mm\lyxeq}
+\fi
+\iffont cmm
+\def\hookrightarrow{\lhook\kern-8mm\rightarrow}
+\def\hookleftarrow{\leftarrow\kern-8mm\rhook}
 \def\bowtie{\triangleright\kern-2mm\triangleleft}
+\fi
+\iffont msa
 \def\dashrightarrow{\lyxdabar\lyxdabar\lyxright}
 \def\dashleftarrow{\lyxleft\lyxdabar\lyxdabar}
 \def\dasharrow{\dashrightarrow}
-\def\Join{\ltimes\kern-2mm\rtimes}
+\fi
+\iffont msb
+\def\Join{\ltimes\kern-12mm\rtimes}
+\fi
 \def\mathcircumflex{\mbox{\^{}}}
 
 neqlyxsymbol 185 0 mathrel  x