Quantcast

Incompatibility of Tk with newer Linux distributions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Incompatibility of Tk with newer Linux distributions

Gregor Cramer
The current library 8.6 (and older versions) is incompatible with the font
service on newer distributions like Linux Mint 18 and Fedora 25, see
https://groups.google.com/forum/#!topic/comp.lang.tcl/XnkRQ5TI-Nc .

The reason is still unknown, probably the whole thing is related with bug
[434d294df8] (http://core.tcl.tk/tk/info/434d294df8b05324). In general all Tk
applications are affected. My application Scidb is not showing the piece
letters because of font size zero. I cannot believe  that such crappy systems
will be distributed. Even if the Tk library is the culprit for this disaster
because of a programming error, the distributor is responsible either to
inform the Tk team and to wait for a working version, or he has to package an
older, compatible version of the font service.

I think that solving this incompatibility problem has highest priority,
currently many Tk applications are suffering from this problem. Who has
LinuxMint 18 or Fedora 25 installed,and can do tests? Unfortunately I don't
have the resources for an installation of another Linux system.

Gregor

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Jan Nijtmans-2
2017-05-15 13:44 GMT+02:00 Gregor Cramer:

> The current library 8.6 (and older versions) is incompatible with the font
> service on newer distributions like Linux Mint 18 and Fedora 25, see
> https://groups.google.com/forum/#!topic/comp.lang.tcl/XnkRQ5TI-Nc .
>
> The reason is still unknown, probably the whole thing is related with bug
> [434d294df8] (http://core.tcl.tk/tk/info/434d294df8b05324). In general all Tk
> applications are affected. My application Scidb is not showing the piece
> letters because of font size zero. I cannot believe  that such crappy systems
> will be distributed. Even if the Tk library is the culprit for this disaster
> because of a programming error, the distributor is responsible either to
> inform the Tk team and to wait for a working version, or he has to package an
> older, compatible version of the font service.
>
> I think that solving this incompatibility problem has highest priority,
> currently many Tk applications are suffering from this problem. Who has
> LinuxMint 18 or Fedora 25 installed,and can do tests? Unfortunately I don't
> have the resources for an installation of another Linux system.

Does this commit fix the problem for you?
    <http://core.tcl.tk/tk/info/09eec5d40f7d53e3>

I'll do some more testing the coming days, but feedback from anyone is
appreciated!

Thanks!
      Jan Nijtmans

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Gregor Cramer
> Does this commit fix the problem for you?
>     <http://core.tcl.tk/tk/info/09eec5d40f7d53e3>

Unfortunately I cannot install another Linux system, I don't have the
resources. François Vogel has announced that he wants to test.

I like to emphasize that there are two problems:

1. The attribute '-size' is zero, this is the lesser evil.

2. Some truetype fonts will not be displayed, because the width and height of
these fonts is 1 under newer Linux distributions, and this is a severe
problem. This is probably a side effect of the first problem, but I don't know.

Download
https://sourceforge.net/p/scidb/code/HEAD/tree/trunk/tcl/fonts/ScidbChessTraveller.ttf 
if an affected truetype font is needed for testing. Under Linux it is
recommended to copy/move this font into directory
/usr/local/share/fonts/truetype/ (/usr/share/fonts/truetype/ on Fedora), or
use a sub-directory. Under Linux this font will be installed with "fc-cache -f
/usr/local/share/fonts/truetype/" (if the latter directory contains the font).
This little script should be sufficient for testing:

    set f [font create -family {Scidb Chess Traveller} -size -12]
    puts [font measure $f "\u2654"]

This script should print "12", but under newer Linux distros it is printing
"1". (I didn't test this script under a newer Linux distro, but my statement
is based on tests with application Scidb, using the same "puts" statement,
done by a system administrator on LinuxMint 18 and Fedora 25)

Gregor

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Jan Nijtmans-2
2017-05-18 20:07 GMT+02:00 Gregor Cramer:

>> Does this commit fix the problem for you?
>>     <http://core.tcl.tk/tk/info/09eec5d40f7d53e3>
>
> Unfortunately I cannot install another Linux system, I don't have the
> resources. François Vogel has announced that he wants to test.
>
> I like to emphasize that there are two problems:
>
> 1. The attribute '-size' is zero, this is the lesser evil.
>
> 2. Some truetype fonts will not be displayed, because the width and height of
> these fonts is 1 under newer Linux distributions, and this is a severe
> problem. This is probably a side effect of the first problem, but I don't know.
>
> Download
> https://sourceforge.net/p/scidb/code/HEAD/tree/trunk/tcl/fonts/ScidbChessTraveller.ttf
> if an affected truetype font is needed for testing. Under Linux it is
> recommended to copy/move this font into directory
> /usr/local/share/fonts/truetype/ (/usr/share/fonts/truetype/ on Fedora), or
> use a sub-directory. Under Linux this font will be installed with "fc-cache -f
> /usr/local/share/fonts/truetype/" (if the latter directory contains the font).
> This little script should be sufficient for testing:
>
>     set f [font create -family {Scidb Chess Traveller} -size -12]
>     puts [font measure $f "\u2654"]
>
> This script should print "12", but under newer Linux distros it is printing
> "1". (I didn't test this script under a newer Linux distro, but my statement
> is based on tests with application Scidb, using the same "puts" statement,
> done by a system administrator on LinuxMint 18 and Fedora 25)
>
> Gregor

This bug should now be fixed on core-8-6-branch and trunk. I tested
it on Ubuntu (16.04), the change indeed breaks some test-cases,
but I think that's OK since the test-cases depend on the fonts
available on the system. For example, if the system has a
real "times new roman" font (mine does ...) I get:

==== font-44.1 TkFontGetPixels: size < 0 FAILED
==== Contents of test case:

    tk scaling 0.5
    font actual {times -12} -size

---- Result was:
9
---- Result should have been (exact matching):
24
==== font-44.1 FAILED



==== font-45.3 TkFontGetAliasList: match FAILED
==== Contents of test case:

    # can fail on Unix systems that have a real "times new roman" font
    font actual {{times new roman} 10} -family

---- Result was:
Times New Roman
---- Result should have been (exact matching):
Nimbus Roman No9 L
==== font-45.3 FAILED

Gregor, many thanks for reporting this, and for your explanation.
This indeed seems critical for Tk 8.6.7!!!

Don, I think everything is ready now for a Tk 8.6.7 release candiate,
unless you have more things you would like to include. Well, everything
I would like to be included is in core-8-6-branch now.

More feedback/testing more than welcome, as always!

Regards,
         Jan Nijtmans

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
In reply to this post by Gregor Cramer
Gregor Cramer a écrit le 18/05/2017 à 20:07 :
> Unfortunately I cannot install another Linux system, I don't have the
> resources. François Vogel has announced that he wants to test.

I have created a new virtual machine and have installed Linux Mint
18.1 with KDE (32 bits) in it.
Installed fossil.
Cloned Tcl and Tk repos.

This already took many hours.

Trying to build, it fails at the configure step:

$ ./configure --prefix=/home/francois/Documents/tcltk/fossil/tcl/unix
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/francois/Documents/tcltk/fossil/tcl/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details

francois@VB ~/Documents/tcltk/fossil/tcl/unix $ cat config.log | grep
error
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5.4.0-6ubuntu1~16.04.4'
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++
--prefix=/usr --program-suffix=-5 --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-i386/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-i386
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-i386
--with-arch-directory=i386
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc
--enable-targets=all --enable-multiarch --disable-werror
--with-arch-32=i686 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic --enable-checking=release
--build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
collect2: error: ld returned 1 exit status
configure:2856: error: in
`/home/francois/Documents/tcltk/fossil/tcl/unix':
configure:2858: error: C compiler cannot create executables
francois@VB ~/Documents/tcltk/fossil/tcl/unix $

$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

Moreover, this VM is so slow that it's hardly usable. Really really
really slow. Much slower than other VMs I run. I'm sure someone else
has better resources. Please step in.

Cheers,
Francois


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
Francois Vogel a écrit le 20/05/2017 à 14:05 :
> Trying to build, it fails at the configure step

Had to install libc-dev.
This Mint 18.1 thing comes with gcc pre-installed, but no devel libc!

F.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
In reply to this post by Gregor Cramer
Gregor Cramer a écrit le 18/05/2017 à 20:07 :
>> Download
>> https://sourceforge.net/p/scidb/code/HEAD/tree/trunk/tcl/fonts/ScidbChessTraveller.ttf
>> if an affected truetype font is needed for testing. Under Linux it is
>> recommended to copy/move this font into directory
>> /usr/local/share/fonts/truetype/ (/usr/share/fonts/truetype/ on Fedora), or
>> use a sub-directory. Under Linux this font will be installed with "fc-cache -f
>> /usr/local/share/fonts/truetype/" (if the latter directory contains the font).

Done this on Linux Mint 18.1.

>> This little script should be sufficient for testing:
>>
>>      set f [font create -family {Scidb Chess Traveller} -size -12]
>>      puts [font measure $f "\u2654"]
>>
>> This script should print "12", but under newer Linux distros it is printing
>> "1". (I didn't test this script under a newer Linux distro, but my statement
>> is based on tests with application Scidb, using the same "puts" statement,
>> done by a system administrator on LinuxMint 18 and Fedora 25)

This script returns 7 for me on Linux Mint 18.1, with trunk at the
bleeding edge (specifically, that is [b8d773c7]).

Where is the bugfix branch?? It seems that several commits were
applied to trunk and 8.6 branch with no bugfix branch at all. That's a
mess to follow, and it's even worse when it's about comparing with
what's happening before these bugfixes. Where is a known faulty state
of whatever faulty branch?How can I know that the problem is fixed or not?

Francois


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
Francois Vogel a écrit le 20/05/2017 à 15:22 :
> Gregor Cramer a écrit le 18/05/2017 à 20:07 :
>>> Download
>>> https://sourceforge.net/p/scidb/code/HEAD/tree/trunk/tcl/fonts/ScidbChessTraveller.ttf
>>> if an affected truetype font is needed for testing. Under Linux it is
>>> recommended to copy/move this font into directory
>>> /usr/local/share/fonts/truetype/ (/usr/share/fonts/truetype/ on Fedora), or
>>> use a sub-directory. Under Linux this font will be installed with "fc-cache -f
>>> /usr/local/share/fonts/truetype/" (if the latter directory contains the font).
> Done this on Linux Mint 18.1.

But I'm unsure about whether the font is correctly installed.

% set f [font create -family {Scidb Chess Traveller} -size -12]
font1
% font actual $f -family
fixed

On Windows the last statement returns "Scidb Chess Traveller", which I believe is more correct.

F.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
Francois Vogel a écrit le 20/05/2017 à 15:30 :

> Francois Vogel a écrit le 20/05/2017 à 15:22 :
>> Gregor Cramer a écrit le 18/05/2017 à 20:07 :
>>>> Download
>>>> https://sourceforge.net/p/scidb/code/HEAD/tree/trunk/tcl/fonts/ScidbChessTraveller.ttf
>>>> if an affected truetype font is needed for testing. Under Linux it is
>>>> recommended to copy/move this font into directory
>>>> /usr/local/share/fonts/truetype/ (/usr/share/fonts/truetype/ on Fedora), or
>>>> use a sub-directory. Under Linux this font will be installed with "fc-cache -f
>>>> /usr/local/share/fonts/truetype/" (if the latter directory contains the font).
>> Done this on Linux Mint 18.1.
> But I'm unsure about whether the font is correctly installed.

Indeed it is not.

fc-cache -f ...  did not show any output, and I supposed that that was OK.

But trying then to install the font using the graphical tool embedded in Mint triggered an error though: "file ScidbChessTraveller.ttf is not a font"

Clueless.
F.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Gregor Cramer
> But trying then to install the font using the graphical tool embedded in
> Mint triggered an error though: "file ScidbChessTraveller.ttf is not a
> font"

I'm also clueless. What is 'file' and 'md5sum' reporting? Under Ubuntu I have:

    > file /usr/local/share/fonts/truetype/Scidb/ScidbChessTraveller.ttf
    /usr/local/share/fonts/truetype/Scidb/ScidbChessTraveller.ttf: TrueType
font data

    > md5sum /usr/local/share/fonts/truetype/Scidb/ScidbChessTraveller.ttf
    1b8757f19b7e730268adb6d7f176aa16  
/usr/local/share/fonts/truetype/Scidb/ScidbChessTraveller.ttf

I know that installation with 'fc-cache' works, even under LinuxMint 18. If I
open this font with

    > gnome-font-viewer
/usr/local/share/fonts/truetype/Scidb/ScidbChessTraveller-1.ttf

then it shows the font correctly. Probably your download of the font failed,
and you got a HTML file instead of a TTF file, sometimes this happens.

Gregor

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
Gregor Cramer a écrit le 20/05/2017 à 17:46 :
> Probably your download of the font failed,
> and you got a HTML file instead of a TTF file, sometimes this happens.

Yes, that was what happened. I downloaded the file with a different
method and have installed it. Now I'm sure I have the font installed,
I can see it in a font viewer.

Nevertheless I still see the same output (this is with trunk):

$ ./wish8.7
% set f [font create -family {Scidb Chess Traveller} -size -12]
font1
% font actual $f
-family fixed -size 9 -weight normal -slant roman -underline 0
-overstrike 0
% font measure $f "\u2654"
7

Apparently the font is not found by Tk.The -family attribute of font
actual is not the expected one.

François

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Gregor Cramer
> Nevertheless I still see the same output (this is with trunk):
>
> $ ./wish8.7
> % set f [font create -family {Scidb Chess Traveller} -size -12]
> font1
> % font actual $f
> -family fixed -size 9 -weight normal -slant roman -underline 0
> -overstrike 0
> % font measure $f "\u2654"
> 7
>
> Apparently the font is not found by Tk.The -family attribute of font
> actual is not the expected one.

Please follow these steps:

    1. login as superuser
    2. > mkdir /usr/local/share/fonts/truetype/Scidb
    3. > mv ScidbChessTraveller.ttf /usr/local/share/fonts/truetype/Scidb
    4. > fc-cache -f /usr/local/share/fonts/truetype

Now start wish8.7, and

    font actual [font create -family {Scidb Chess Traveller} -size -12]

must show "-family {Scidb Chess Traveller} -size -12 ...". I have tested these
steps with a new font under Ubuntu, and I know that LinuxMint works in the
same way (both, Ubuntu and LinuxMint, are based on Debian). In fact this works
with any UNIX distribution if fontconfig is installed, only Fedora needs a
different installation directory: /usr/share/fonts/truetype instead of
/usr/local/share/fonts/truetype. /usr/share/fonts/truetype can also be used on
any other Linux distro, but it's common to use /usr/local/ for (temporary)
extensions.

Gregor

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Jan Nijtmans-2
2017-05-22 10:32 GMT+02:00 Gregor Cramer:
> Please follow these steps:
...
> Now start wish8.7, and
>
>     font actual [font create -family {Scidb Chess Traveller} -size -12]
>
> must show "-family {Scidb Chess Traveller} -size -12 ...". I have tested these


Well, I tried your steps with Tk 8.6.6 on Ubuntu:
$ wish8.6
% font actual [font create -family {Scidb Chess Traveller} -size -12]
-family {Scidb Chess Traveller} -size 0 -weight normal -slant roman
-underline 0 -overstrike 0

And then with current core-8-6-branch:
$ wish8.6
% font actual [font create -family {Scidb Chess Traveller} -size -12]
-family {Scidb Chess Traveller} -size 9 -weight normal -slant roman
-underline 0 -overstrike 0

So, this looks like the correct answer to me, "-size 0" should never
be produced!

Sure, this influences test-cases, which now fail because font-sizes
are different
than before. The question is, how to handle that! At least, the
release notes for
Tk 8.6.7 must mention the difference in font handling, because it might have
visible effect for end users. But this font example shows that the new handling
is better than the old one, "-size 0" should never be produced!

@Don/@Francois, how is your position on that?

Regards,
       Jan Nijtmans

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
In reply to this post by Gregor Cramer
Gregor Cramer a écrit le 22/05/2017 à 10:32 :
> Please follow these steps:
>
>      1. login as superuser
>      2. > mkdir /usr/local/share/fonts/truetype/Scidb
>      3. > mv ScidbChessTraveller.ttf /usr/local/share/fonts/truetype/Scidb
>      4. > fc-cache -f /usr/local/share/fonts/truetype

Done.I even tried the "really-force" option, in verbose mode:

# fc-cache -r -v /usr/local/share/fonts/truetype
/usr/local/share/fonts/truetype: caching, new cache contents: 0 fonts,
1 dirs
/usr/local/share/fonts/truetype/Scidb: caching, new cache contents: 1
fonts, 0 dirs
Re-scanning /usr/local/share/fonts/truetype: caching, new cache
contents: 0 fonts, 1 dirs
/var/cache/fontconfig: cleaning cache directory
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded

> Now start wish8.7, and
>
>      font actual [font create -family {Scidb Chess Traveller} -size -12]
>
> must show "-family {Scidb Chess Traveller} -size -12 ...".

Believe it or not, I still get:

# /home/francois/Documents/tcltk/fossil/tcltk/bin/wish8.7
% font actual [font create -family {Scidb Chess Traveller} -size -12]
-family fixed -size 9 -weight normal -slant roman -underline 0
-overstrike 0

As already explained, my understanding is that the font should be
correctly installed, I can see it (the chess symbols) in a font viewer
launched from the "System settings" thing.

Also:

$ fc-list | grep Scidb
/usr/local/share/fonts/truetype/Scidb/ScidbChessTraveller.ttf: Scidb
Chess Traveller:style=Regular

F.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
In reply to this post by Jan Nijtmans-2
Jan Nijtmans a écrit le 22/05/2017 à 14:55 :
> Sure, this influences test-cases, which now fail because font-sizes
> are different
> than before. The question is, how to handle that! At least, the
> release notes for
> Tk 8.6.7 must mention the difference in font handling, because it might have
> visible effect for end users. But this font example shows that the new handling
> is better than the old one, "-size 0" should never be produced!
>
> @Don/@Francois, how is your position on that?

I would have loved to see all those changes in a bugfix branch, so
that anyone can easily and carefully analyze the proposed fix and
investigate new test failures one by one, instead of make several
successive partial commits directly in core-8-6-branch and trunk.
At present, I'm completely lost about where is the reference failing
state (I mean: more recent than the 8-6-6 tag).I assume you're much
more certain than I would be about what you're incrementally
committing, so I think I will leave success assessment to you. Sorry,
I'm unsure at the moment about affirming anything firmer.

F.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Jan Nijtmans-2
2017-05-22 21:26 GMT+02:00 Francois Vogel:
> I would have loved to see all those changes in a bugfix branch, so that
> anyone can easily and carefully analyze the proposed fix and investigate new
> test failures one by one, instead of make several successive partial commits
> directly in core-8-6-branch and trunk.
> At present, I'm completely lost about where is the reference failing state
> (I mean: more recent than the 8-6-6 tag).I assume you're much more certain
> than I would be about what you're incrementally committing, so I think I
> will leave success assessment to you. Sorry, I'm unsure at the moment about
> affirming anything firmer.

No problem. Let's go from here.  The problem is this: When I run the "font.test"
from Tk 8.6.6 (!!) on latest Ubuntu (17.4, 32-bit) I get:

========================================================
Tests began at Tue May 23 11:40:21 CEST 2017
font.test


==== font-4.9 font command: actual FAILED
==== Contents of test case:

    # (objc > 3) so objPtr = objv[3 + skip]
    string tolower [font actual {-family times} -family]

---- Result was:
nimbus roman no9 l
---- Result should have been (exact matching):
times
==== font-4.9 FAILED



==== font-8.4 font command: families FAILED
==== Contents of test case:

    # TkpGetFontFamilies()
    regexp -nocase times [font families]

---- Result was:
0
---- Result should have been (exact matching):
1
==== font-8.4 FAILED



==== font-9.5 font command: measure FAILED
==== Contents of test case:

    # Tk_TextWidth()
    expr {[font measure $fixed "abcdefg"] == [font measure $fixed "a"]*7 }

---- Result was:
0
---- Result should have been (exact matching):
1
==== font-9.5 FAILED



==== font-10.9 font command: metrics: get individual metrics FAILED
==== Contents of test case:

    font metrics $fixed -ascent
    font metrics $fixed -descent
    font metrics $fixed -linespace
    font metrics $fixed -fixed

---- Result was:
0
---- Result should have been (exact matching):
1
==== font-10.9 FAILED



==== font-21.6 Tk_PostscriptFontName procedure: spaces FAILED
==== Contents of test case:

    psfontname "{new century schoolbook} 10"

---- Result was:
CenturySchoolbookL
---- Result should have been (exact matching):
NewCenturySchlbk-Roman
==== font-21.6 FAILED



==== font-24.5 Tk_ComputeTextLayout: break line FAILED
==== Contents of test case:

    .t.l config -text "000\t00000" -wrap [expr 9 * $ax]
    update
    list [expr {[winfo reqwidth .t.l] eq [expr {$ax * 8}]}]  [expr
{[winfo reqheight .t.l] eq [expr {$ay * 2}]}]

---- Result was:
0 1
---- Result should have been (exact matching):
1 1
==== font-24.5 FAILED



==== font-44.1 TkFontGetPixels: size < 0 FAILED
==== Contents of test case:

    tk scaling 0.5
    font actual {times -12} -size

---- Result was:
0
---- Result should have been (exact matching):
24
==== font-44.1 FAILED



==== font-45.3 TkFontGetAliasList: match FAILED
==== Contents of test case:

    # can fail on Unix systems that have a real "times new roman" font
    font actual {{times new roman} 10} -family

---- Result was:
Liberation Serif
---- Result should have been (exact matching):
Nimbus Roman No9 L
==== font-45.3 FAILED


Tests ended at Tue May 23 11:40:24 CEST 2017
all.tcl:    Total    283    Passed    249    Skipped    26    Failed    8
Sourced 1 Test Files.
Files with failing tests: font.test
=======================================================

Running the same test-suite on current core-8-6-branch, I get:
=======================================================
Tests began at Tue May 23 11:47:10 CEST 2017
font.test


==== font-4.9 font command: actual FAILED
==== Contents of test case:

    # (objc > 3) so objPtr = objv[3 + skip]
    string tolower [font actual {-family times} -family]

---- Result was:
nimbus roman no9 l
---- Result should have been (exact matching):
times
==== font-4.9 FAILED



==== font-8.4 font command: families FAILED
==== Contents of test case:

    # TkpGetFontFamilies()
    regexp -nocase times [font families]

---- Result was:
0
---- Result should have been (exact matching):
1
==== font-8.4 FAILED



==== font-9.5 font command: measure FAILED
==== Contents of test case:

    # Tk_TextWidth()
    expr {[font measure $fixed "abcdefg"] == [font measure $fixed "a"]*7 }

---- Result was:
0
---- Result should have been (exact matching):
1
==== font-9.5 FAILED



==== font-10.9 font command: metrics: get individual metrics FAILED
==== Contents of test case:

    font metrics $fixed -ascent
    font metrics $fixed -descent
    font metrics $fixed -linespace
    font metrics $fixed -fixed

---- Result was:
0
---- Result should have been (exact matching):
1
==== font-10.9 FAILED



==== font-21.6 Tk_PostscriptFontName procedure: spaces FAILED
==== Contents of test case:

    psfontname "{new century schoolbook} 10"

---- Result was:
CenturySchoolbookL
---- Result should have been (exact matching):
NewCenturySchlbk-Roman
==== font-21.6 FAILED



==== font-24.5 Tk_ComputeTextLayout: break line FAILED
==== Contents of test case:

    .t.l config -text "000\t00000" -wrap [expr 9 * $ax]
    update
    list [expr {[winfo reqwidth .t.l] eq [expr {$ax * 8}]}]  [expr
{[winfo reqheight .t.l] eq [expr {$ay * 2}]}]

---- Result was:
0 1
---- Result should have been (exact matching):
1 1
==== font-24.5 FAILED



==== font-44.1 TkFontGetPixels: size < 0 FAILED
==== Contents of test case:

    tk scaling 0.5
    font actual {times -12} -size

---- Result was:
9
---- Result should have been (exact matching):
24
==== font-44.1 FAILED



==== font-45.3 TkFontGetAliasList: match FAILED
==== Contents of test case:

    # can fail on Unix systems that have a real "times new roman" font
    font actual {{times new roman} 10} -family

---- Result was:
Liberation Serif
---- Result should have been (exact matching):
Nimbus Roman No9 L
==== font-45.3 FAILED


Tests ended at Tue May 23 11:47:14 CEST 2017
all.tcl:    Total    287    Passed    252    Skipped    27    Failed    8
Sourced 1 Test Files.
Files with failing tests: font.test
===========================================================

This means, the number of failed test-cass is still 8, but at least font-44.1
gives a better answer than before (was: 0, now: 9).

My conclusion - unfortunately - is that the test-cases are too font-dependant
to be useful. Since the only change is use doubles in more places in stead of
int's (which prevent possible rounding problems), I think we should continue
this way and fix the test-cases (as far as they turn out to be broken).

Past experience shows that hardly anyone tests branches, the only
way to get people to test changes is to bring it to core-8-6-branch or
trunk. This fix seems critical on newer Linux systems, so as much
people as possible should test their applications with it. That's why
I was eager to bring it to core-8-6-branch (it started on a bug-fix
branch, but simply no-one looked at it ....)

Thanks!
           Jan Nijtmans

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Donald G Porter-2
In reply to this post by Francois Vogel
On 05/20/2017 08:05 AM, Francois Vogel wrote:
> Moreover, this VM is so slow that it's hardly usable. Really really
> really slow. Much slower than other VMs I run. I'm sure someone else
> has better resources. Please step in.

I can confirm that on a Fedora 25 system I can access with a build
of Tk 8.6.6 I see test font-44.1 fail:

==== font-44.1 TkFontGetPixels: size < 0 FAILED
==== Contents of test case:

         tk scaling 0.5
     font actual {times -12} -size

---- Result was:
0
---- Result should have been (exact matching):
24
==== font-44.1 FAILED

Updating to the tip of core-8-6-branch, the test passes.

Does that answer the question?

--
| Don Porter            Applied and Computational Mathematics Division |
| [hidden email]             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Donald G Porter-2
On 05/23/2017 02:11 PM, Donald G Porter wrote:
> Updating to the tip of core-8-6-branch, the test passes.

More info.

When test font-44.1 is run in isolation, it passes.

When all of font.test is run, it fails like so:

==== font-44.1 TkFontGetPixels: size < 0 FAILED
==== Contents of test case:

         tk scaling 0.5
     font actual {times -12} -size

---- Result was:
9
---- Result should have been (exact matching):
24
==== font-44.1 FAILED

Still room for improvement.  How can I help?

--
| Don Porter            Applied and Computational Mathematics Division |
| [hidden email]             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Donald G Porter-2
On 05/23/2017 02:23 PM, Donald G Porter wrote:
> When test font-44.1 is run in isolation, it passes.
>
> When all of font.test is run, it fails...

In particular, font-44.1 fails when it follows the evaluation
of test font-42.2.

Hope that information helps anyone who knows the font system.

--
| Don Porter            Applied and Computational Mathematics Division |
| [hidden email]             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Incompatibility of Tk with newer Linux distributions

Francois Vogel
Donald G Porter a écrit le 23/05/2017 à 20:29 :
> On 05/23/2017 02:23 PM, Donald G Porter wrote:
>> When test font-44.1 is run in isolation, it passes.

Yes.

>> When all of font.test is run, it fails...

Yes.

> In particular, font-44.1 fails when it follows the evaluation
> of test font-42.2.

Not for me (on Linux Mint 18.1).

make test TESTFLAGS="-file font.test -match font-4* -verbose beps"

runs font-42.2 and font-44.1 still passes. However font-44.2 then
fails (among others).

F.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-core
12
Loading...