Discussion:
Call for testers: features/str-metrics, take 2
Jean-Marc Lasgouttes
2014-07-01 09:21:02 UTC
Permalink
Hello,

The features/str-metrics branch is now to a point where I think it is
ready to land on master, where further fixing can take place. Before I
do that, I would be grateful if some of you could try it out and report
their findings.

I hope that all problems related to Arabic of Hebrew script are now
solved, but one never knows...

The performance seems pretty good to me. My unscientific measure is to
load user guide, move the scrollbar thumb up and doewn and see how the
thumb lags behind the mouse.

One can improve further the performance by un-checking the option "use
justification in LyX workarea" in document settings. This is because it
allows an optimization where strings are drawn several words at a time.
This can be done for justified text too, but requires more work.

Ticket #9003
http://www.lyx.org/trac/ticket/9003
is the place where one can follow what happened wrt this feature. There
are still a couple open bugs, I'd appreciate feedback on these, since I
cannot reproduce.

Thanks for your help.

JMarc
Kornel Benko
2014-07-01 11:59:18 UTC
Permalink
Post by Jean-Marc Lasgouttes
Hello,
The features/str-metrics branch is now to a point where I think it is
ready to land on master, where further fixing can take place. Before I
do that, I would be grateful if some of you could try it out and report
their findings.
I hope that all problems related to Arabic of Hebrew script are now
solved, but one never knows...
The performance seems pretty good to me. My unscientific measure is to
load user guide, move the scrollbar thumb up and doewn and see how the
thumb lags behind the mouse.
One can improve further the performance by un-checking the option "use
justification in LyX workarea" in document settings. This is because it
allows an optimization where strings are drawn several words at a time.
This can be done for justified text too, but requires more work.
Ticket #9003
http://www.lyx.org/trac/ticket/9003
is the place where one can follow what happened wrt this feature. There
are still a couple open bugs, I'd appreciate feedback on these, since I
cannot reproduce.
Thanks for your help.
JMarc
I tried. Editing seemed to work fine. Then I tried to compile a changed lyx-file, but somehow
I managed to have made it invalid.

This is not really a problem of str-metrics branch.
I can reproduce it also with trunk, by simply creating a 4x3 emty table.

Kornel
Kornel Benko
2014-07-01 12:14:39 UTC
Permalink
Post by Kornel Benko
Post by Jean-Marc Lasgouttes
Hello,
The features/str-metrics branch is now to a point where I think it is
ready to land on master, where further fixing can take place. Before I
do that, I would be grateful if some of you could try it out and report
their findings.
I hope that all problems related to Arabic of Hebrew script are now
solved, but one never knows...
The performance seems pretty good to me. My unscientific measure is to
load user guide, move the scrollbar thumb up and doewn and see how the
thumb lags behind the mouse.
One can improve further the performance by un-checking the option "use
justification in LyX workarea" in document settings. This is because it
allows an optimization where strings are drawn several words at a time.
This can be done for justified text too, but requires more work.
Ticket #9003
http://www.lyx.org/trac/ticket/9003
is the place where one can follow what happened wrt this feature. There
are still a couple open bugs, I'd appreciate feedback on these, since I
cannot reproduce.
Thanks for your help.
JMarc
I tried. Editing seemed to work fine. Then I tried to compile a changed lyx-file, but somehow
I managed to have made it invalid.
This is not really a problem of str-metrics branch.
I can reproduce it also with trunk, by simply creating a 4x3 emty table.
Kornel
Hm, changing \font_math to 'auto', it compiles again.

# test.lyx test.fail.lyx
15c15
< \font_math auto
---
Post by Kornel Benko
\font_math default
Kornel
Jean-Marc Lasgouttes
2014-07-01 14:55:39 UTC
Permalink
Post by Kornel Benko
I tried. Editing seemed to work fine. Then I tried to compile a changed lyx-file, but somehow
I managed to have made it invalid.
Thanks for the report. Are you a Linux user? I admit I do not recall that.

JMarc
Kornel Benko
2014-07-01 15:32:52 UTC
Permalink
Post by Jean-Marc Lasgouttes
Post by Kornel Benko
I tried. Editing seemed to work fine. Then I tried to compile a changed lyx-file, but somehow
I managed to have made it invalid.
Thanks for the report. Are you a Linux user? I admit I do not recall that.
Yes, I am.
I found the reason, it was an older default template used by 'new file'.
#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474

I wonder, where it is missed in the lyx2lyx chain.
Post by Jean-Marc Lasgouttes
JMarc
Kornel
Scott Kostyshak
2014-07-01 14:41:45 UTC
Permalink
Post by Jean-Marc Lasgouttes
Hello,
The features/str-metrics branch is now to a point where I think it is ready
to land on master, where further fixing can take place. Before I do that, I
would be grateful if some of you could try it out and report their findings.
The build succeeds for me with Qt 4 but fails with Qt 5 (using
-DLYX_USE_QT=QT5). See the build flags and error below.

cd /home/scott/lyxbuilds/master/CMakeBuild/src/frontends/qt4 &&
/usr/bin/c++ -DBOOST_SIGNALS_NO_DEPRECATION_WARNING=1
-DLYX_BUILD_QT4_FRONTEND -DQT_CONCURRENT_LIB -DQT_CORE_LIB
-DQT_GENUINE_STR -DQT_GUI_LIB -DQT_WIDGETS_LIB -Wall
-Wunused-parameter -fno-strict-aliasing -Wall -Wunused-parameter
-fno-strict-aliasing -O0 -g3 -D_DEBUG -fPIC
-I/home/scott/lyxbuilds/master/CMakeBuild
-I/home/scott/lyxbuilds/master/repo/src -I/usr/include/enchant
-I/home/scott/lyxbuilds/master/repo/boost
-I/home/scott/lyxbuilds/master/repo/src/frontends
-I/home/scott/lyxbuilds/master/repo/src/frontends/qt4
-I/home/scott/lyxbuilds/master/CMakeBuild/src/frontends/qt4
-I/usr/include/qt5/QtCore -I/usr/include/qt5
-I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64
-I/usr/include/qt5/QtGui -I/usr/include/qt5/QtWidgets
-I/usr/include/qt5/QtConcurrent -DBOOST_USER_CONFIG="<config.h>" -o
CMakeFiles/frontend_qt4.dir/GuiAlert.cpp.o -c
/home/scott/lyxbuilds/master/repo/src/frontends/qt4/GuiAlert.cpp
/home/scott/lyxbuilds/master/repo/src/frontends/qt4/GuiPainter.cpp: In
member function ‘virtual int lyx::frontend::GuiPainter::text(int, int,
const docstring&, const lyx::Font&, lyx::Color, lyx::size_type,
lyx::size_type)’:
/home/scott/lyxbuilds/master/repo/src/frontends/qt4/GuiPainter.cpp:433:7:
error: ‘UniteClip’ is not a member of ‘Qt’
Qt::UniteClip);
^

It looks like this change was intended:
"This is one of the few source breakages we will do for Qt 5. The
unite clip complicates and slows down some rendering paths and it is
not very useful."
https://bugreports.qt-project.org/browse/QTBUG-20140

We still don't officially support Qt 5 though so perhaps this is not
an immediate concern.

Scott
Jean-Marc Lasgouttes
2014-07-01 14:54:48 UTC
Permalink
Post by Scott Kostyshak
error: ‘UniteClip’ is not a member of ‘Qt’
Qt::UniteClip);
^
"This is one of the few source breakages we will do for Qt 5. The
unite clip complicates and slows down some rendering paths and it is
not very useful."
https://bugreports.qt-project.org/browse/QTBUG-20140
These are amusing people. How do they suggest that I draw a string but
hide the middle? Is the best solution to draw the string twice with two
different clip rects? I can do that.

JMarc
Scott Kostyshak
2014-07-01 15:15:49 UTC
Permalink
On Tue, Jul 1, 2014 at 10:54 AM, Jean-Marc Lasgouttes
Post by Scott Kostyshak
error: ‘UniteClip’ is not a member of ‘Qt’
Qt::UniteClip);
^
"This is one of the few source breakages we will do for Qt 5. The
unite clip complicates and slows down some rendering paths and it is
not very useful."
https://bugreports.qt-project.org/browse/QTBUG-20140
These are amusing people. How do they suggest that I draw a string but hide
the middle? Is the best solution to draw the string twice with two different
clip rects? I can do that.
Others seem puzzled also by the change. e.g.
http://permalink.gmane.org/gmane.comp.lib.qt.user/5518
(and there was no reply to that message it seems).

Scott
Jean-Marc Lasgouttes
2014-07-01 21:57:56 UTC
Permalink
Post by Scott Kostyshak
error: ‘UniteClip’ is not a member of ‘Qt’
Qt::UniteClip);
^
"This is one of the few source breakages we will do for Qt 5. The
unite clip complicates and slows down some rendering paths and it is
not very useful."
https://bugreports.qt-project.org/browse/QTBUG-20140
This should be fixed now.

JMarc
Scott Kostyshak
2014-07-02 01:36:25 UTC
Permalink
Post by Jean-Marc Lasgouttes
Post by Scott Kostyshak
error: ‘UniteClip’ is not a member of ‘Qt’
Qt::UniteClip);
^
"This is one of the few source breakages we will do for Qt 5. The
unite clip complicates and slows down some rendering paths and it is
not very useful."
https://bugreports.qt-project.org/browse/QTBUG-20140
This should be fixed now.
Works well.

Scott
Jean-Marc Lasgouttes
2014-07-03 09:23:02 UTC
Permalink
Post by Jean-Marc Lasgouttes
The features/str-metrics branch is now to a point where I think it is
ready to land on master, where further fixing can take place. Before I
do that, I would be grateful if some of you could try it out and report
their findings.
Something I forgot to mention (this is for Enrico!): since the
introduction of InsetEnvSeparator creted lots of conflicts with my own
changes to TextMetrics.cpp, I reverted the problematic changes when
rebasing the branch and then reintroduced the necessary changes on top
of the branch. There were 3 patches concerned, on of which did not
conflict at all actually... The relevant commits of master are c668ebf6
and 061509bf. Basically, what counts it the first one.

I hope I did not break anything...

There are however things that I do not understand with this inset. What
happens when it is in the middle of a paragraph? Does it do something
sensible?

JMarc
Enrico Forestieri
2014-07-03 19:00:20 UTC
Permalink
Post by Jean-Marc Lasgouttes
Post by Jean-Marc Lasgouttes
The features/str-metrics branch is now to a point where I think it is
ready to land on master, where further fixing can take place. Before I
do that, I would be grateful if some of you could try it out and report
their findings.
Something I forgot to mention (this is for Enrico!): since the
introduction of InsetEnvSeparator creted lots of conflicts with my
own changes to TextMetrics.cpp, I reverted the problematic changes
when rebasing the branch and then reintroduced the necessary changes
on top of the branch. There were 3 patches concerned, on of which
did not conflict at all actually... The relevant commits of master
are c668ebf6 and 061509bf. Basically, what counts it the first one.
I hope I did not break anything...
I tried the features/str-metrics branch and I did not found any breakage
after a cursory check.
Post by Jean-Marc Lasgouttes
There are however things that I do not understand with this inset.
What happens when it is in the middle of a paragraph? Does it do
something sensible?
Yes, the plain version is equivalent to a blank space, while the parbreak
version introduces a blank line in the latex export (it is a latex
parbreak, rather than a lyx one).

However, you can insert the inset in the middle of paragraph only through
the lfun (there is no way to insert it through the GUI). And I hope to
have made it difficult enough to select it by alone, such that it is also
difficult inserting it in the middle by copy/paste without also inserting
a lyx parbreak.

You get it automatically in situations where you would have had to insert
the Separator layout. For example, if you insert an environment and go out
of it by a double return, a third one will automatically insert the inset.

In this way, one can both automatically separate environments and easily
insert a blank line after a list or itemize, for example.

Of course, the lfun could be disabled when the cursor is not at the end
of a lyx paragraph, but I don't like gratuitous limitations if they do
not solve real problems.
--
Enrico
Jean-Marc Lasgouttes
2014-07-08 09:59:09 UTC
Permalink
Post by Jean-Marc Lasgouttes
Hello,
The features/str-metrics branch is now to a point where I think it is
ready to land on master, where further fixing can take place. Before I
do that, I would be grateful if some of you could try it out and report
their findings.
I hope that all problems related to Arabic of Hebrew script are now
solved, but one never knows...
OK, would there be some opposition to merging this code now? I am ready
to do changes before landing, but I have to know which one.

If you would like to test the branch before landing but did not find the
time to wait yet, please tell me.

My current plan is to rebase once again and merge into master on Monday.

JMarc

Loading...