Skip to content
Merged
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ option(EbsdLib_BUILD_H5SUPPORT "Build H5Support Library" OFF)


# set project's name
project(EbsdLibProj VERSION 2.3.0)
project(EbsdLibProj VERSION 2.4.0)


# Request C++17 standard, using new CMake variables.
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Debug"
"value": "Release"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion Source/Apps/generate_ipf_legends.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
using namespace ebsdlib;

// const std::string k_Output_Dir(ebsdlib::unit_test::DataDir + "/IPF_Legend/");
const std::string k_Output_Dir(ebsdlib::unit_test::TestTempDir + "/IPF_Legend/");
const std::string k_Output_Dir(ebsdlib::unit_test::k_TestTempDir + "/IPF_Legend/");

using EbsdDoubleArrayType = EbsdDataArray<float>;
using EbsdDoubleArrayPointerType = EbsdDoubleArrayType::Pointer;
Expand Down
1 change: 1 addition & 0 deletions Source/EbsdLib/SourceList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PUBLIC
Eigen3::Eigen
fmt::fmt
)

if(WIN32 AND BUILD_SHARED_LIBS)
Expand Down
4 changes: 2 additions & 2 deletions Source/EbsdLib/Utilities/ColorTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ void EbsdColorTable::GetColorTable(int numColors, std::vector<float>& colorsOut)
const float nodeStepSize = 1.0F / (maxNodeIndex);
for(int i = 0; i < numColors; i++)
{
float pos = i * stepSize; // [0, 1] range
const float pos = static_cast<float>(i) * stepSize; // [0, 1] range
int currColorBin = static_cast<int>(pos / nodeStepSize);
float currFraction = (pos / nodeStepSize) - currColorBin;
const float currFraction = (pos / nodeStepSize) - static_cast<float>(currColorBin);

float r;
float g;
Expand Down
15 changes: 12 additions & 3 deletions Source/EbsdLib/Utilities/Fonts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,30 @@ namespace ebsdlib::fonts
std::vector<unsigned char> GetFiraSansRegular()
{
static std::vector<unsigned char> fontData;
Base64Decode(fonts::k_FiraSansRegularBase64, fontData);
if(fontData.empty())
{
Base64Decode(fonts::k_FiraSansRegularBase64, fontData);
}
return fontData;
}

std::vector<unsigned char> GetLatoRegular()
{
static std::vector<unsigned char> fontData;
Base64Decode(fonts::k_LatoRegularBase64, fontData);
if(fontData.empty())
{
Base64Decode(fonts::k_LatoRegularBase64, fontData);
}
return fontData;
}

std::vector<unsigned char> GetLatoBold()
{
static std::vector<unsigned char> fontData;
Base64Decode(fonts::k_LatoBoldBase64, fontData);
if(fontData.empty())
{
Base64Decode(fonts::k_LatoBoldBase64, fontData);
}
return fontData;
}

Expand Down
Loading
Loading