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

Support @font-face on Windows #376

Closed
liZe opened this issue Oct 28, 2016 · 0 comments
Closed

Support @font-face on Windows #376

liZe opened this issue Oct 28, 2016 · 0 comments
Labels
feature New feature that should be supported
Milestone

Comments

@liZe
Copy link
Member

liZe commented Oct 28, 2016

I've successfully made @font-face work on Windows (using fontconfig too) with small changes:

  • I've removed if sys.platform.startswith('win') from fonts.py.
  • I've added 'libfontconfig-1' in dlopen for fontconfig (we can probably remove 'fontconfig' or 'libfontconfig') in fonts.py.
  • I've created a file called fonts.config with the content from Fontconfig error: Cannot load default config file shoes/shoes3#46.
  • I've set the environment variable FONTCONFIG_FILE to the config file path.
  • I've added a try/except block around fonts.py's clean (removing the temporary files) because Windows says that the file is used by another process. (see OSError: Too many open files #396).

With these changes, @font-face works, but some problems remain:

  • We have to find a reliable way to create and make fontconfig use fonts.config.
  • We have to find a way to make this file accurate (find folders containing fonts used by Windows, depending on how Windows is installed).

If anyone is interested in solving this problem, I can provide some help (as long as the question is not related to Windows 😄).

@liZe liZe added the feature New feature that should be supported label Oct 28, 2016
@liZe liZe closed this as completed Mar 18, 2018
@liZe liZe added this to the 43 milestone Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported
Projects
None yet
Development

No branches or pull requests

1 participant