Skip to content
Myr

stb_easy_font: fix multiple definition errors

Before adoption: this commit came in with the history the project adopted, so no landing records it.

There changes fix posible multiple definition errors when include stb_easy_font.h header to more then one source file. Closes #777

authored by Konstantin Podsvirov · committed by Konstantin Podsvirov · parent c72a95d · Browse files · 1 file+6 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−5 removed

  • other:+6 added−5 removed

1 file+6 added−5 removed

modified:stb_easy_font.h+6 added-5 removed
76 unmodified lines
77// (2015-02-01) 0.5 First release78//79// CONTRIBUTORS80//81// github:vassvik -- bug report81// github:vassvik -- bug report82// github:podsvirov -- fix multiple definition errors8384#if 085// SAMPLE CODE:86//
20 unmodified lines
107108#include <stdlib.h>109#include <math.h>110110struct stb_easy_font_info_struct {111static struct stb_easy_font_info_struct {112 unsigned char advance;113 unsigned char h_seg;114 unsigned char v_seg;115} stb_easy_font_charinfo[96] = {
22 unmodified lines
138 { 23,180,248 }, { 22,189,248 }, { 22,191,252 }, { 5,196,252 },139 { 3,203,252 }, { 5,203,253 }, { 22,210,253 }, { 0,214,253 },140};141141unsigned char stb_easy_font_hseg[214] = {142static unsigned char stb_easy_font_hseg[214] = {143 97,37,69,84,28,51,2,18,10,49,98,41,65,25,81,105,33,9,97,1,97,37,37,36,144 81,10,98,107,3,100,3,99,58,51,4,99,58,8,73,81,10,50,98,8,73,81,4,10,50,145 98,8,25,33,65,81,10,50,17,65,97,25,33,25,49,9,65,20,68,1,65,25,49,41,146 11,105,13,101,76,10,50,10,50,98,11,99,10,98,11,50,99,11,50,11,99,8,57,
3 unmodified lines
150 26,82,41,25,33,82,26,49,73,35,90,17,81,41,65,57,41,65,25,81,90,114,20,151 84,73,57,41,49,25,33,65,81,9,97,1,97,25,33,65,81,57,33,25,41,25,152};153153unsigned char stb_easy_font_vseg[253] = {154static unsigned char stb_easy_font_vseg[253] = {155 4,2,8,10,15,8,15,33,8,15,8,73,82,73,57,41,82,10,82,18,66,10,21,29,1,65,156 27,8,27,9,65,8,10,50,97,74,66,42,10,21,57,41,29,25,14,81,73,57,26,8,8,157 26,66,3,8,8,15,19,21,90,58,26,18,66,18,105,89,28,74,17,8,73,57,26,21,158 8,42,41,42,8,28,22,8,8,30,7,8,8,26,66,21,7,8,8,29,7,7,21,8,8,8,59,7,8,
29 unmodified lines
188 }189 return offset;190}191191float stb_easy_font_spacing_val = 0;192static float stb_easy_font_spacing_val = 0;193static void stb_easy_font_spacing(float spacing)194{195 stb_easy_font_spacing_val = spacing;196}
108 unmodified lines