Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How can I pack dlls into exe and how can sf::Font load the font from the system?  (Read 322 times)

0 Members and 1 Guest are viewing this topic.

JasonLeon

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
The dll that SFML project needs is kind of large. openal32, sfml-audio-d-2, sfml-graphics-d-2, sfml-network-d-2, sfml-system-d-2, sfml-window-d-2, six dlls are totally 13.7 MB.
Besides, font file is approximately 20MB, can sf::Font load from system fonts?
I'm using CLion, by the way.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10777
    • View Profile
    • development blog
    • Email
You can link SFML statically, that way all the needed symbols will be included in your executable. The only exception is OpenAL due to licensing reasons, it will have to remain as DLL.

SFML doesn't provide any facilities to access system fonts, as that wouldn't really work cross-platform, but if you know the path, you should be able to just point to the path and load from there.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/