Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fonts render wrong on GTK+3 #1522

Closed
nullchinchilla opened this issue Nov 19, 2016 · 4 comments
Closed

Fonts render wrong on GTK+3 #1522

nullchinchilla opened this issue Nov 19, 2016 · 4 comments

Comments

@nullchinchilla
Copy link

On GTK+3, controls render correctly if I leave the fonts at their default, but the fonts become far too small if I set any custom font. The ratio of the shrinking seems to be the ratio of a pt to a px. This even happens if I manually set normal-control-font as the font. My screen and display setup is not Retina or otherwise strange.

On GTK+2 and Windows the fonts render normally.

Here's a trivial example that shows what I mean:

#lang racket/gui

;; expected: two "hello world" of the same size
;; actual: on GTK+3, the second one is far smaller.
;;         on other platforms, behaves as expected.

;; in fact any text seems to render far smaller
;; in GTK+3, except when I don't specify any font.

;; my system is GNOME 3 on Debian. My screen has
;; a conventional density and isn't Retina or anything.

(define main-frame
  (new frame%
       [label "demo"]
       [stretchable-width #f]
       [stretchable-height #f]))

(define msg-1
  (new message%
       [parent main-frame]
       [label "hello world"]))

(define msg-2
  (new message%
       [parent main-frame]
       [label "hello world"]
       [font normal-control-font]))

(send main-frame show #t)
@mflatt
Copy link
Member

mflatt commented Dec 15, 2016

Thanks for the report! I've been trying various distributions that I have conveniently available, and none of them have failed in this way, so I think it's a matter of trying the right distirbution and/or configuration. Can you tell me more about your OS and GTK+ 3 installation/version?

@nullchinchilla
Copy link
Author

I am on the latest Debian Unstable with the default gnome installation and the racket package from the Debian repos. GTK+3 version is 3.22. I don't think there's anything weird with my setup, and the behavior has been stable through many system updates for a long time.

@mflatt
Copy link
Member

mflatt commented Dec 19, 2016

I think I've tracked the problem down to a repair in GTK+3 3.22 that breaks a workaround in racket/gui, and I've pushed an intended repair to racket/gui as racket/gui@5e70534

@mflatt
Copy link
Member

mflatt commented Jan 30, 2017

I think this is fixed in v6.8.

@mflatt mflatt closed this as completed Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants