1
Graphics / Problem about function loadFromFile() of class sf::Font
« on: June 23, 2023, 05:30:21 pm »
Hello everyone,
I'm new to SFML and I'm encountering an issue with the `loadFromFile()` function in the `sf::Font` class. Below is my source code:
```
sf::Font font;
if (!font.loadFromFile("C:\\Windows\\Fonts\\Arial.ttf"))
{
return -1;
}
```
When I run the program with Visual Studio 2022, the `Microsoft Visual Studio Debug Console` displays "Failed to load from file "" (failed to create the font face)". What can I do to fix this issue?
Thank you all very much!
I'm new to SFML and I'm encountering an issue with the `loadFromFile()` function in the `sf::Font` class. Below is my source code:
```
sf::Font font;
if (!font.loadFromFile("C:\\Windows\\Fonts\\Arial.ttf"))
{
return -1;
}
```
When I run the program with Visual Studio 2022, the `Microsoft Visual Studio Debug Console` displays "Failed to load from file "" (failed to create the font face)". What can I do to fix this issue?
Thank you all very much!