Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-25202

perl-Tk-804.035-7.el9.x86_64 doesn't choose fonts correctly

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhel-9.5
    • rhel-9.3.0
    • perl-Tk
    • None
    • perl-Tk-804.035-8.el9
    • None
    • None
    • rhel-sst-cs-stacks
    • ssg_core_services
    • 10
    • 12
    • 8
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      perl-Tk-804.035-7.el9.x86_64 doesn't choose fonts correctly.

      In RHEL8.9 both use the list you get with fc-list, which seems to be the correct behavior.

      A private build of the newest Perl Tk-804.036 from https://metacpan.org/dist/Tk within RHEL9.3 provides the correct font family list.

      Customer also said -

      ===================
      the problem is, that you set XFT=0 in the spec file of your perl-Tk-804.035-7.el9.src.rpm package. This inhibits the use of freetype2, fontconfig and Xft fonts.

      I think you did this, because setting XFT=1 breaks the configuring of fonts by
      $xxx>configure(-font => [-family => $family, -size => $size, -weight => $weight, -slant => $slant, -underline => $underline, -overstrike => $overstrike]);
      in perl/Tk programs.
      Only
      $xxx>configure(-font => [$family, $size, $weight, $slant]);
      works and "underline" and "overstrike" are not settable this way.
      This is maybe worse than having a limited number of fonts at hand.

      So I'm not sure if you are willing to substitute one problem by another.

      Let me know, how you decide. It is always possible for us to make our own version of perl-Tk with XFT=1 set, as we can change the few calls of "configure(-font =>" and don't need setting "underline" and "overstrike".

      ===================

      Please provide the package NVR for which bug is seen:

      N/A

      How reproducible:

      Always/Persistent.

      Steps to reproduce

      1. Take a RHEL9.3 installation
      2. Install perl-Tk.x86_64
      3. Install tk.x86_64
      4. Make the scripts, make them executable and execute them.

      Scripts -

      ==================

      Sample Program:

      #!/usr/bin/perl
      use Tk;
      my $mw = MainWindow->new;
      foreach my $font (sort $mw->fontFamilies) { 
      print "$font\n"; 
      } 
      

      Prints the font families you get with xfontsel, whereas tcl/Tk gets the fonts families you get with fc-list. See sample program:

      #!/usr/bin/tclsh 
      package require Tk 
      foreach font [lsort [font families]] { 
      puts $font 
      }
      

      Expected results

      In RHEL8.9 both use the list you get with fc-list, which seems to be the correct behavior.

      Actual results

      With the current version of perl-Tk-804.035-7.el9.x86_64 theĀ  fonts are ugly and inconsistent with our tcl/Tk applications.

              jplesnik@redhat.com Jitka Plesnikova
              rhn-support-mijjapur Murali Prudhvi Dhar Rao Ijjapureddi
              perl-maint-list perl-maint-list
              Martin Kyral Martin Kyral
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: