openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

ofTrueTypeFont mesh insert at once

Open dimitre opened this issue 8 months ago • 2 comments

dimitre avatar Apr 19 '25 03:04 dimitre

I'm loving to look at the errors here:

../../../libs/openFrameworks/graphics/ofTrueTypeFont.cpp:1021:3: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'unsigned short' in initializer list [-Wc++11-narrowing]
 1021 |                 firstIndex + 1U,

ofIndexType is an alias to TESSIndex. does it need to be? TESSIndex vary from platform to platform? Ins't unsigned short is too short to represent indices? What about this was fixed std::size_t for all platforms?

dimitre avatar Apr 20 '25 12:04 dimitre

@dimitre there is definitely a historical reason for ofIndexType being TESSIndex - something with max buffer sizes on memory constrained devices? I can't remember 100%, but I wouldn't change it unless there is bug that it solves.

ofTheo avatar Apr 21 '25 15:04 ofTheo