Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix FT_CHECK compat with macOS 10.15 #30123

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

Merged
merged 1 commit into from
May 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ft2font.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef MPL_FT2FONT_H
#define MPL_FT2FONT_H

#include <filesystem>
#include <set>
#include <string>
#include <string_view>
Expand Down Expand Up @@ -42,11 +41,12 @@ inline char const* ft_error_string(FT_Error error) {

// No more than 16 hex digits + "0x" + null byte for a 64-bit int error.
#define THROW_FT_ERROR(name, err) { \
std::string path{__FILE__}; \
char buf[20] = {0}; \
sprintf(buf, "%#04x", err); \
snprintf(buf, sizeof buf, "%#04x", err); \
throw std::runtime_error{ \
name " (" \
+ std::filesystem::path(__FILE__).filename().string() \
+ path.substr(path.find_last_of("/\\") + 1) \
+ " line " + std::to_string(__LINE__) + ") failed with error " \
+ std::string{buf} + ": " + std::string{ft_error_string(err)}}; \
} (void)0
Expand Down
Loading