From 3a156be80125ce15255f1a3f2b1e34525b6082fd Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Sun, 16 Apr 2023 07:37:49 +0200 Subject: [PATCH] check for existing #defines --- src/gpufont/font.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gpufont/font.hpp b/src/gpufont/font.hpp index 77fad40..175e702 100644 --- a/src/gpufont/font.hpp +++ b/src/gpufont/font.hpp @@ -15,9 +15,15 @@ #include FT_FREETYPE_H #include FT_MULTIPLE_MASTERS_H -#define F26DOT6_TO_DOUBLE(x) (1 / 64. * double(x)) -#define F16DOT16_TO_DOUBLE(x) (1 / 65536. * double(x)) -#define DOUBLE_TO_F16DOT16(x) FT_Fixed(65536. * x) +#ifndef F26DOT6_TO_DOUBLE + #define F26DOT6_TO_DOUBLE(x) (1 / 64. * double(x)) +#endif +#ifndef F16DOT16_TO_DOUBLE + #define F16DOT16_TO_DOUBLE(x) (1 / 65536. * double(x)) +#endif +#ifndef DOUBLE_TO_F16DOT16 + #define DOUBLE_TO_F16DOT16(x) FT_Fixed(65536. * x) +#endif namespace ofxGPUFont {