Skip to content

Commit 999877a

Browse files
committed
fix(build): Fix warning when Freetype is disabled
A variable was declared unconditionally but only used when Freetype is enabled. Move its declaration to be within the right conditional. Signed-off-by: Larry Gritz <[email protected]>
1 parent edb2b4f commit 999877a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libOpenImageIO/imagebufalgo_draw.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,6 @@ static const char* font_dir_prefixes[]
740740
static const char* font_dir_suffixes[]
741741
= { "fonts", "Fonts", "Library/Fonts",
742742
"share/fonts", "share/Fonts", "share/fonts/OpenImageIO" };
743-
static const char* default_font_name[] = { "DroidSans", "cour", "Courier New",
744-
"FreeMono", nullptr };
745743
// static const char* font_extensions[] = { "", ".ttf", ".ttc", ".pfa", ".pfb" };
746744

747745

@@ -884,6 +882,10 @@ static mutex ft_mutex;
884882
static FT_Library ft_library = NULL;
885883
static bool ft_broken = false;
886884

885+
static const char* default_font_name[] = { "DroidSans", "cour", "Courier New",
886+
"FreeMono", nullptr };
887+
888+
887889

888890
// Helper: given unicode and a font face, compute its size
889891
static ROI

0 commit comments

Comments
 (0)