Discussion:
Antialiased Nedit, UTF8 now a possibility
Dušan Peterc
2009-06-22 22:10:25 UTC
Permalink
Hello nedit developers!

If some of you are using OpenMotif 2.3 or later, you can quickly try nedit
with AA fonts using the following command:

nedit -xrm "*renderTable: rt" -xrm "*rt*fontType: FONT_IS_XFT" -xrm
"*rt*fontName: Sans" -xrm "*rt*fontSize: 10"

Probably there is a simpler way of writing this, but it is good enough for
trial.
Most of the interface works OK, actually all pure Motif widgets work.

I hope this will raise the interest of somebody willing to do the remaining
10% (or is it 50% ?).
The text in the main window is not antialiased, and the text in the help
window.

I have converted my Motif applications into antialiased fonts and UTF8,
as OpenMotif's implementation of Antialiased fonts only supports UTF8, not
iso8859-x encodings.

Actually, some UTF8 <-> isoXXXX encoding is probably necessary in such an
editor, just like kwrite has it.
Probably it should be handled in a similar way as DOS / UNIX CR/LF is
handled now, where UTF8 would be the inner display mode, and various input
encodings would be converted by iconv() library on input and on output (if
the edited file would be in an encoding other than (UTF8).

I think that nedit would remain a popular editor for the next 15 years, if
only it had support for for antialiased fonts and UTF8.
Many users and/or programmers suggested dropping Motif in favor of a more
modern toolkit.
Many times Motif was blamed for not providing this or that. Now Motif AA
fonts and UTF8 it, but nedit is unable to use it. Isn't that sad?

I know there will be many users who will say that their old platform does
not support OpenMotif.
I think that with OpenSolaris, even SUN users can use OpenMotif, as kernel
is open source.
The case of die hard DEC users should be handled by compile options and
ifdefs.

Let me know if this is of interest to anyone, and if I can help with any
hints or debugging the new developments.
My knowledge of inner working of Motif is minimal, I am only an application
developer.

Dušan Peterc
http://www.arahne.si

P.S.
You can check my web site to see that Motif application can quite modern,
if you use antialiased fonts and color icons.
Loading Image...
Loading Image...
Loading Image...
Not the ugly blue in the face Motif that the motif haters love to hate.
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Thomas Orgis
2009-06-23 08:44:24 UTC
Permalink
Am Tue, 23 Jun 2009 00:10:25 +0200
Post by Dušan Peterc
I hope this will raise the interest of somebody willing to do the remaining
10% (or is it 50% ?).
The text in the main window is not antialiased, and the text in the help
window.
Problem is that the text widget is rather at the core of a text editor...
10% is definitely not enough.
Post by Dušan Peterc
Actually, some UTF8 <-> isoXXXX encoding is probably necessary in such an
editor, just like kwrite has it.
The conversion itself is not the big isssue when you have iconv() available...
Post by Dušan Peterc
handled now, where UTF8 would be the inner display mode, and various input
That's the core point: You need to work UTF (or, rather wide characters of
16 or 32 bit) into nedit, with all the funny unicode aspects like greatly
enlarged character classes. Nedit does not just need to display the text,
it needs to work it.
Post by Dušan Peterc
I think that nedit would remain a popular editor for the next 15 years, if
only it had support for for antialiased fonts and UTF8.
I agree to Unicode support, but I rather prefer a clean fixed width bitmap
font for program text (like the misc-fixed unicode font I use in my terminal).
I see anti-aliasing being more important when you deal with layout that has
more to do with typesetting ... like, I cannot bear looking at PDF text
documents without anti-aliasing on a computer screen.
Post by Dušan Peterc
Many users and/or programmers suggested dropping Motif in favor of a more
modern toolkit.
Many times Motif was blamed for not providing this or that. Now Motif AA
fonts and UTF8 it, but nedit is unable to use it. Isn't that sad?
The toolkit support is one prerequesite, but not nearly all the work...
Post by Dušan Peterc
I know there will be many users who will say that their old platform does
not support OpenMotif.
Actually, I dropped OpenMotif because my platform is too _new_! OpenMotif wants
the Xprint library, which is not included anymore with current Xorg versions.
It's a showstopper for now... and then, there's the other point that prevented me
from doing much work for making it work again:
OpenMotif is not free software. See

http://www.marutan.net/cde/
Post by Dušan Peterc
I think that with OpenSolaris, even SUN users can use OpenMotif, as kernel
is open source.
Well, we also have "proper" Motif on our Sun systems at work... but then, that's
Solaris, not OpenSolaris;-)
Post by Dušan Peterc
My knowledge of inner working of Motif is minimal, I am only an application
developer.
That is where nedit needs work: Inside the application (editor core and text widget).
So if you want to step in, I can imagine people welcoming this;-)


Alrighty then,

Thomas.
Dušan Peterc
2009-06-23 23:17:12 UTC
Permalink
Hello Thomas,
Post by Thomas Orgis
Problem is that the text widget is rather at the core of a text editor...
10% is definitely not enough.
Without some programmer's optimism, it is hard to accomplish anything ;-)
All OpenMotif widgets were reworked for XFT (antialiased fonts) and UTF8
support, and I do not think more that 20% of code has been modified. But I
do not say it is a small task.
Post by Thomas Orgis
Actually, some UTF8 <-> isoXXXX encoding is probably necessary in such an
Post by Dušan Peterc
editor, just like kwrite has it.
The conversion itself is not the big isssue when you have iconv() available...
iconv library is available on all Linux systems, and it is also open source
in the way you like it.
http://en.wikipedia.org/wiki/Iconv
Post by Thomas Orgis
Post by Dušan Peterc
handled now, where UTF8 would be the inner display mode, and various
input
That's the core point: You need to work UTF (or, rather wide characters of
16 or 32 bit) into nedit, with all the funny unicode aspects like greatly
enlarged character classes. Nedit does not just need to display the text,
it needs to work it.
The way I understand it, the advantage of UTF8 is that you can still use all
the same string functions, as your character data is still allocated at byte
level, sub<128 characters are still just one byte long, only the "funny"
characters are longer. So the change is much smaller than if you need to
convert to 16 bit or 32 bit characters.
http://en.wikipedia.org/wiki/UTF-8
Post by Thomas Orgis
I agree to Unicode support, but I rather prefer a clean fixed width bitmap
font for program text (like the misc-fixed unicode font I use in my terminal).
I see anti-aliasing being more important when you deal with layout that has
more to do with typesetting ... like, I cannot bear looking at PDF text
documents without anti-aliasing on a computer screen.
Agreed about antialiasing, but UTF8 is becoming a necessity even in normal
text editing, even for filenames.
Anyway, the fixed non AA text rendering would still be available.

Actually, I dropped OpenMotif because my platform is too _new_! OpenMotif
Post by Thomas Orgis
wants
the Xprint library, which is not included anymore with current Xorg versions.
It's a showstopper for now...
I use OpenMotif on new platforms (OpenSUSE 10.3 and 11.1), and I do not have
problems with Xprint library.
I download it from CVS, type
./autogen.sh
make
make install
and my resulting motif programs do not link against Xprint

If your platform is somewhat different, then I guess you can disable Xprint
in
config/cf/X11.tmpl
or using the parameter BuildXprint to the autogen.sh
Post by Thomas Orgis
and then, there's the other point that prevented me
OpenMotif is not free software. See
http://www.marutan.net/cde/
CDE is not (Open)Motif, I think at this time CDE is largely irrelevant (but
I did sign the petition at the time).

I much prefer writing code to license wars.
I don't like OpenMotif license. But to say that it is not open source is an
exaggeration, no matter who says it.
You have the source, you can make the changes, and the process of
posting/accepting fixes is open.
http://openmotif.cvs.sourceforge.net/openmotif/
http://www.motifzone.net/
http://bugs.motifzone.net/show_bug.cgi
http://openmotif.cvs.sourceforge.net/viewvc/openmotif/openmotif/lib/Xm/?sortby=date#dirlist

OpenMotif's license is an open license with strings attached - you can not
use it on operating systems whose kernel is not open source.
But GPL also puts claims on your code, it asks you to release your other
source against which you link, as GPL.
To me, GPL is more limiting than OpenMotif license.
So I would not disqualify OpenMotif based use or development based solely on
the license.

Lesstiff, the blessed open alternative, does not see a lot of development
lately
http://lesstif.cvs.sourceforge.net/viewvc/lesstif/lesstif/lib/Xm/?sortby=date#dirlist
(contrat that to OpenMotif above).

That is where nedit needs work: Inside the application (editor core and text
Post by Thomas Orgis
widget).
So if you want to step in, I can imagine people welcoming this;-)
I am willing to contribute, under guidance of someone with more expertise in
Motif's inner works.

Thanks for your feedback.

Dušan Peterc
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Joerg Fischer
2009-06-24 07:16:53 UTC
Permalink
Post by Dušan Peterc
I don't like OpenMotif license. But to say that it is not open source is an
exaggeration, no matter who says it.
You have the source, you can make the changes, and the process of
posting/accepting fixes is open.
http://openmotif.cvs.sourceforge.net/openmotif/
http://www.motifzone.net/
http://bugs.motifzone.net/show_bug.cgi
http://openmotif.cvs.sourceforge.net/viewvc/openmotif/openmotif/lib/Xm/?sortby=date#dirlist
OpenMotif's license is an open license with strings attached - you can not
use it on operating systems whose kernel is not open source.
But GPL also puts claims on your code, it asks you to release your other
source against which you link, as GPL.
To me, GPL is more limiting than OpenMotif license.
So I would not disqualify OpenMotif based use or development based solely on
the license.
I'm afraid you don't see the differences. Perhaps this is because of
the silly "open source" phrase, which naturally anyone understands
like you get the source code. In this sense, anything would be fine.

The problem is OpenMotif is not free software. The string attached
disqualifies OpenMotif's license by contradicting against one of the
elementary freedoms. One can't disallow to use software depending on
whether one likes the respective platform. You shouldn't claim this
would be comparable to the GPL, which ensures the software to stay
(truly) free software in any respect. This different "string
attached" was coined as copyleft, which is a pun to copyright.
Essential it means that software should have no owners right from the
start. But since one can't change the copyright law, the trick is to
use the very same copyright to declare software "ownerless" once and
for all. This isn't a string attached in the real sense IMO.

Now, if this sounds too theoretical, you got a practical example right
away with NEdit. NEdit was developed on a Unix system, and till today
it is most commonly used on Unix systems. This is allowed, since NEdit
is free software. If the old Motif on Unix systems could be replaced
with its follower OpenMotif then maybe you would have more developers
listening...

Cheers,
Jörg
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Dušan Peterc
2009-06-24 19:51:37 UTC
Permalink
Hello Jörg,
Post by Joerg Fischer
Post by Dušan Peterc
OpenMotif's license is an open license with strings attached - you can
not
Post by Dušan Peterc
use it on operating systems whose kernel is not open source.
But GPL also puts claims on your code, it asks you to release your other
source against which you link, as GPL.
To me, GPL is more limiting than OpenMotif license.
So I would not disqualify OpenMotif based use or development based solely
on
Post by Dušan Peterc
the license.
I'm afraid you don't see the differences. Perhaps this is because of
the silly "open source" phrase, which naturally anyone understands
like you get the source code. In this sense, anything would be fine.
The problem is OpenMotif is not free software. The string attached
disqualifies OpenMotif's license by contradicting against one of the
elementary freedoms. One can't disallow to use software depending on
whether one likes the respective platform. You shouldn't claim this
would be comparable to the GPL, which ensures the software to stay
(truly) free software in any respect. This different "string
attached" was coined as copyleft, which is a pun to copyright.
Essential it means that software should have no owners right from the
start. But since one can't change the copyright law, the trick is to
use the very same copyright to declare software "ownerless" once and
for all. This isn't a string attached in the real sense IMO.
Now, if this sounds too theoretical, you got a practical example right
away with NEdit. NEdit was developed on a Unix system, and till today
it is most commonly used on Unix systems. This is allowed, since NEdit
is free software. If the old Motif on Unix systems could be replaced
with its follower OpenMotif then maybe you would have more developers
listening...
It is quite the opposite - GPL puts claims on the new code which I write,
using a toolkit or pieces of code.
Some bearded guy takes away my rights and will preach to the world using my
code.
http://www.linuxtoday.com/news_story.php3?ltsn=2000-06-05-022-04-OP-CY&tbovrmode=3
RMS said: "Motif still cannot be part of a free operating system, and
combining or linking someone else's GPL-covered code with Motif is still a
violation of the GPL except in very special circumstances."
This is so idiotic that I can't even argue against it. He is trying to
"outlaw" the use of nedit over OpenMotif, because he does not like the
OpenMotif's license. Thank you expanding my freedom.

OpenMotif's license only puts limitations on where I can use OpenMotif. I
can only use it on open source kernels. Any true freedom lover will not have
a problem with that, since he or she already uses only free software. I may
not like it, but copyright owners have this right. But it does not say
anything about my code. See the difference? See that OpenMotif license gives
me more freedom than GPL.

I am sorry we are discussing licenses instead of code.
I really dislike that, and I have never seen a discussion on licenses, where
someone changed opinion.

So let's forget about OpenMotif, if you people dislike it so much.
How about changing the function drawString() and redrawLineNumbers() from
textDisp.c
and replace XDrawImageString(...)
with XftDrawStringUtf8(...)
would someone support me, if I did this change?
I can make a small test change, with iso8859-1 to UTF8 conversion and XFT
antialiased font display.

Dušan Peterc
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Erik de Castro Lopo
2009-06-24 22:46:08 UTC
Permalink
Post by Dušan Peterc
It is quite the opposite - GPL puts claims on the new code which I write,
using a toolkit or pieces of code.
There is a real simple solution to that problem. If you use GPL code
abide by the license. If you don't want to abide by the license,
don't use the GPL code. The choice is yours.

Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Joerg Fischer
2009-06-25 06:34:21 UTC
Permalink
Post by Dušan Peterc
OpenMotif's license only puts limitations on where I can use OpenMotif. I
can only use it on open source kernels. Any true freedom lover will not have
a problem with that, since he or she already uses only free software.
This is an argumetation somewhat like any free speech supporter would
have no problem if someone is not allowed to argue against free
speech, and you only need to come to the US to find out how wrong
you are ;-)
Post by Dušan Peterc
I may not like it, but copyright owners have this right. But it
does not say anything about my code. See the difference? See that
OpenMotif license gives me more freedom than GPL.
As long as you claim things like "your code", you actually mean
proprietary software, and yes the GPL puts a limitation to this by
intention. However, I'm patient, since I know it took me years, too,
to understand copyleft. Understanding is a lengthy process sometimes.

Cheers,
Jörg
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Thomas Orgis
2009-06-25 07:22:33 UTC
Permalink
Am Thu, 25 Jun 2009 08:34:21 +0200
Post by Joerg Fischer
Post by Dušan Peterc
OpenMotif's license only puts limitations on where I can use OpenMotif. I
can only use it on open source kernels. Any true freedom lover will not have
a problem with that, since he or she already uses only free software.
This is an argumetation somewhat like any free speech supporter would
have no problem if someone is not allowed to argue against free
speech, and you only need to come to the US to find out how wrong
you are ;-)
OK, I don't really understand Jörg's argument, but I see an issue with that usage restriction to "open source kernels", too.
I understand that the GPL may seem more restrictive for you, for a developer wanting to write and distribute software, it indeed is. It limits the restrictions you can put onto your users, and adds restrictions for people again using your software and distributing the result.
But what it does not restrict is a very important realm: It does not restrict the _usage_ of the software.
I can use GPL software in any way I want. Heck, I can link it with loads of proprietary code and happily use it, as long as I don't distribute the result. GPL forbids spreading of such derived proprietary/GPL mixed software, but it does not forbid anyone from creating it for personal use.

So, anyone can compile nedit with OpenMotif, or the Motif that happens to be installed on her proprietary UNIX system and use it. One just should not distribute such a build when wanting to comply to the GPL.
Though, nedit could add a linking exception in place to allow distribution of openmotif binaries... but with plain GPL, that's not adhering to the license.
Though nedit folks as copyright holders are unlikely to enforce that part of the license, I suppose.

Dušan: Thanks for your hint on probably getting openmotif compiled under my system (which is GNU/Linux with rolling release that already catched up with Xorg that dropped libXPrint ... it may hit you later;-).
But actually, I came to this list with exactly that question, and the discussion reasoned that it is more worth it focusing on a working version of the free alternative to Motif, lesstif, which actually saw some revival of development (not that visible on the outside yet, apparently).
Downside is that there is no Unicode in lesstif, AFAIK .. blurry memory, ah here:

http://www.lesstif.org/FAQ.html#QU4.10

So the issue stands that you may produce a nedit that supports AA fonts and Unicode using OpenMotif, but it would not appear on free systems like debian (as official package) unless it also works with lesstiff or a wholly different toolkit (like FTLK, which already borrowed the nedit text widget, as I recall?).

Btw, refer to these earlier discussions about OpenMotif/lesstif:

http://www.nedit.org/pipermail/discuss/2009-February/009992.html
http://www.nedit.org/pipermail/discuss/2009-March/009996.html
http://www.nedit.org/pipermail/discuss/2009-March/010033.html

End result of all that is me currently using nedit CVS snapshot with a patched lesstif CVS snapshot.
It's not crashing at me, but not working perfectly, neither... "real" Motif (on Solaris or Tru64, in my case) technically works better -- if it were free...

I see the real chance to get away from these legalese trouble in a rewrite of nedit... trying to port the spirit and leanness of the program to some other toolkit (or just Xlib, since the text widget is custom anyway;-).
Actually, I would be fine with a rather bare text window and the menu being available in a separate (nedit client) app.
I need the menu mainly for reconfiguring nedit anyway. And heck, if the config files would be more human-friendly, I wouldn't even bother with the GUI for them... I'd just edit 'em in nedit;-)
But I understand that this would destroy the initial user base of nedit, which started as an easy-to-use, mouse GUI style editor for everyone.
Hm, I'm talking strange. Should stop now.


Alrighty then,

Thomas.

Loading...