less couts

This commit is contained in:
jrkb 2023-04-07 09:50:04 +02:00
parent c0de84ab00
commit 244abc777a

View file

@ -54,13 +54,11 @@ void Atlas::setup(string _fontPath){
<< "\tmax:" << axis.maxValue << "\tmax:" << axis.maxValue
<< "\t:default:" << axis.defaultValue << endl; << "\t:default:" << axis.defaultValue << endl;
variationAxesAvailable.push_back(axis); variationAxesAvailable.push_back(axis);
cout << __LINE__ << endl;
addVariations({ addVariations({
{axis.name, axis.minValue}, {axis.name, axis.minValue},
{axis.name, axis.maxValue} {axis.name, axis.maxValue}
//{axis.name, axis.defaultValue} //{axis.name, axis.defaultValue}
}); });
cout << __LINE__ << endl;
} }
ofLogNotice("Atlas::setup()") << "retrieved variation axes"; ofLogNotice("Atlas::setup()") << "retrieved variation axes";
}else{ }else{
@ -107,7 +105,6 @@ void Atlas::addVariations(vector <FontVariation> variations){
const FontVariation & a = variationExtremes[i]; const FontVariation & a = variationExtremes[i];
const FontVariation & b = variationExtremes[i + 1]; const FontVariation & b = variationExtremes[i + 1];
float diff = b.value - a.value; float diff = b.value - a.value;
cout << __LINE__ << endl;
int stepAmount = ceil(diff / settings.maxInterpolationStepSize); int stepAmount = ceil(diff / settings.maxInterpolationStepSize);
float step = diff / stepAmount; float step = diff / stepAmount;
float value = a.value + step; float value = a.value + step;