Juan Francisco Cantero Hurtado <i...@juanfra.info> writes:

> Your code works for me.
>
> solene@ and I tested this code and worked for us:
>
> #lang racket
>
> (require 2htdp/image)
>
> (define (hello)
>   (text/font "Hello World 42" 24 "black"
>              "Luxi Sans" 'roman 'normal 'normal #f))
>
> (save-image (hello) "test.png")

The `text/font` function works for me too:

    https://ricketyspace.net/tmp/racket-drracket-text_font-works.png

> In the video, I see font rendering problems in the DrRacket REPL, which
> is quite weird because the code editor and the menu work fine. So, you
> have missing fonts, a broken config which renders erroneously some
> glyphs or a broken lib. htdp uses the draw lib and it uses cairo. If we
> had cairo/pango broken, we would see missing glyphs everywhere. Racket
> doesn't use low level libs.

Yes, I forgot to point out that the text in the DrRacket REPL has
the same rendering issue too.

> Try this:
> - Change /etc/installurl to https://cdn.openbsd.org/pub/OpenBSD
> - sysupgrade -f -s
> - pkg_add -Dinstalled -Viu
> - pkg_delete -a
>
> That should reinstall everything and remove old libraries.

Thanks. I tried the above recipe; it doesn't seem to fix the issue.

When I did:

     $ pkg_add -Dinstalled -Viu

     It asked me to update the font path:

     --- +ghostscript-fonts-8.11p3 -------------------
     You may wish to update your font path for 
/usr/local/share/fonts/ghostscript
     --- +liberation-fonts-2.00.1p1 -------------------
     You may wish to update your font path for /usr/local/share/fonts/Liberation
     --- +noto-cjk-2.001 -------------------
     You may wish to update your font path for /usr/local/share/fonts/noto
     --- +noto-emoji-20180810 -------------------
     You may wish to update your font path for /usr/local/share/fonts/noto
     --- +noto-fonts-20171024 -------------------
     You may wish to update your font path for /usr/local/share/fonts/noto
     --- +terminus-font-4.47p0 -------------------
     You may wish to update your font path for /usr/local/share/fonts/terminus

     I did:

     $ xset fp+ /usr/local/share/fonts/ghostscript
     $ xset fp+ /usr/local/share/fonts/Liberation
     .
     .
     $ xset fp+ /usr/local/share/fonts/terminus

     Then tried DrRacket; it didn't fix the issue.

     I did (both as a user and as root):

     $ fc-cache -fv

     # fc-cache -fv

     Didn't help.

     I tried creating a new user (via adduser(8)) and ran DrRacket as
     the new user; the text did rendered properly in the REPL and for my
     version of the hello function[1].

     [1]: https://ricketyspace.net/tmp/text.rkt

I'm not sure if I'm missing a font that DrRacket is looking for.

Here's the output of:

     $ fc-list

     https://ricketyspace.net/tmp/cygnus.fc-list

Output of:

     $ pkg_info

     https://ricketyspace.net/tmp/cygnus.pkgs

Packages diff generated by daily insecurity output after I had ran the
`pkg_add -Dinstalled -Viu` and `pkg_delete -a` you suggested:

     https://ricketyspace.net/tmp/cygnus.pkgs.diff

     The diff tells adobe-source-code-pro and cantarell-fonts were
     removed. I added them back and did `xset fp+ ...` and `fc-cache
     -fv` both as root and as a user. It didn't seem to solve the issue.

- rsiddharth

Reply via email to