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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - eriskcn

Pages: [1]
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!

Pages: [1]