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 are not rendered #106

Open
furgo16 opened this issue Oct 23, 2023 · 7 comments
Open

Fonts are not rendered #106

furgo16 opened this issue Oct 23, 2023 · 7 comments

Comments

@furgo16
Copy link
Contributor

furgo16 commented Oct 23, 2023

While a list of available system fonts is displayed whenever there is a font selector in the GUI, selecting any given font does not seem to have any effect. The font remains always the same.

Fonts

Steps to reproduce

  1. Create a new document and select the Draft workbench
  2. Create a text annotation (T, E)
  3. With the text selected, go to the View tab in the Combo View panel
  4. Change the Font Name property: select any font from the combo box

Expected:

  • The text annotation is displayed in the selected font

Actual:

  • The text annotation is always displayed in the default font
@furgo16
Copy link
Contributor Author

furgo16 commented May 2, 2024

Asked for help on the Snapcrafters forum: https://forum.snapcraft.io/t/fixing-fonts-on-the-freecad-snap/40026

@soumyaDghosh
Copy link

@furgo16 Can you kindly share some logs by running the app from the terminal?

@furgo16
Copy link
Contributor Author

furgo16 commented May 26, 2024

@soumyaDghosh thanks. Are you looking for something specific? There is not much of an output running from the terminal and following the steps to reproduce:

freecad
FreeCAD 0.22.0, Libs: 0.22.0devR37472 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2024
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Adding snap-specific PYTHONPATH to sys.path: $HOME/snap/freecad/common/.local/lib/python3.10/site-packages:/snap/freecad/1031/lib/python3.10/site-packages:/snap/freecad/1031/usr/lib/python3/dist-packages
Qt: Session management error: Could not open network socket
This version of FreeCAD (0.22-37472) is not compatible with Assembly4
You may encounter erors, it is rather suggested to use the stable 0.21 branch
connect failed: No such file or directory

@soumyaDghosh
Copy link

Can't find any snap specific logs! @chennes @ppd I think this is something with paths or similar. Please kindly look into this.

@furgo16
Copy link
Contributor Author

furgo16 commented Jun 5, 2024

Information on how to add font support to snaps seems inexistent, or at least I'm unable to find it. The closest I found was this comment from a bug report:

Workaround for this issue:
(in apps section)
apps:
some_app:
command: some_app
environment:
XDG_DATA_HOME: $SNAP/usr/share
FONTCONFIG_PATH: $SNAP/etc/fonts/conf.d
FONTCONFIG_FILE: $SNAP/etc/fonts/fonts.conf

Of course this only works in devmode. After switching to strict mode program in snap ends with error that it can't reach /etc/fonts/fonts.conf file. I think should be resolved by adding interface.

These environment variables are not defined in FreeCAD's snapcraft.yaml file. On my system:

  • /snap/freecad/etc/fonts/conf.d is empty
  • /snap/freecad/etc/fonts/fonts.conf does not exist.
  • $HOME/snap/freecad/common/.cache/fontconfig/ has lots of files in it

Digging deeper, it seems that fonts should be handled by the kde-neon extension, as defined in snapcraft.yaml

@furgo16
Copy link
Contributor Author

furgo16 commented Oct 4, 2024

@furgo16
Copy link
Contributor Author

furgo16 commented Oct 4, 2024

Also related (though I'm not sure if it still applies): https://www.chalk-ridge.com/freecad-snap-package-font-problems-fix/

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