Package: fonts-fantasque-sans
Version: 1.7.2~alpha.3~dfsg-2
Severity: normal

Dear Maintainer,

After the recent update from libpango-1.0-0 (1.42.4-8) to 1.44.7-3, fantasque-
sans fonts fail to render in applications like gedit, gnome-terminal, geany.

The attached minimal demonstrator produces the output shown in the attached
image.

Not sure if this should be filed to this package or pango, but my guess is that
something should be done here.

Best regards
Kostas



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information
from gi.repository import Gtk, Gdk, cairo, Pango, PangoCairo
import math
import sys


RADIUS = 150
N_WORDS = 10
#FONT = "Sans Bold 27"
FONT = "Fantasque Sans Mono Regular 20"
#FONT = "Sans Bold 27"

class Squareset(Gtk.DrawingArea):
    def __init__ (self, upper=9, text=''):
##        Gtk.Widget.__init__(self)
        Gtk.DrawingArea.__init__(self)
        self.set_size_request (200, 200)
##        self.show_all()  

    def do_draw_cb(self, widget, cr):
        # The do_draw_cb is called when the widget is asked to draw itself
        # with the 'draw' as opposed to old function 'expose event' 
        # Remember that this will be called a lot of times, so it's usually
        # a good idea to write this code as optimized as it can be, don't
        # Create any resources in here.

          cr.translate ( RADIUS, RADIUS)
        
          layout = PangoCairo.create_layout (cr)
          layout.set_text("Text", -1)
          desc = Pango.font_description_from_string (FONT)
#          print("\n".join(dir(desc)))
          print('filename:',desc.to_filename())
          print('string:',desc.to_string())
          layout.set_font_description( desc)
          cr.set_source_rgb ( 1., 0, 0.)
          PangoCairo.update_layout (cr, layout)
          width, height = layout.get_size()
          cr.move_to ( - (float(width) / 1024.) / 2, - RADIUS)
          PangoCairo.show_layout (cr, layout)
              

def destroy(window):
        Gtk.main_quit()

def main():
    window = Gtk.Window()
    window.set_title ("Hello World")

    app = Squareset()

    window.add(app)
                       
    app.connect('draw', app.do_draw_cb)
    window.connect_after('destroy', destroy)
    window.show_all()
    Gtk.main()
       
if __name__ == "__main__":
    sys.exit(main()) 

Reply via email to