mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-02 12:37:20 +01:00
Fixed build with IMGUI_ENABLE_FREETYPE (#8346)
This commit is contained in:
parent
afb6e9a879
commit
96e3b147f0
@ -2819,6 +2819,13 @@ void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsig
|
|||||||
*data = table[*data];
|
*data = table[*data];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ImFontAtlasBuildGetOversampleFactors(const ImFontConfig* cfg, int* out_oversample_h, int* out_oversample_v)
|
||||||
|
{
|
||||||
|
// Automatically disable horizontal oversampling over size 36
|
||||||
|
*out_oversample_h = (cfg->OversampleH != 0) ? cfg->OversampleH : (cfg->SizePixels * cfg->RasterizerDensity > 36.0f || cfg->PixelSnapH) ? 1 : 2;
|
||||||
|
*out_oversample_v = (cfg->OversampleV != 0) ? cfg->OversampleV : 1;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef IMGUI_ENABLE_STB_TRUETYPE
|
#ifdef IMGUI_ENABLE_STB_TRUETYPE
|
||||||
// Temporary data for one source font (multiple source fonts can be merged into one destination ImFont)
|
// Temporary data for one source font (multiple source fonts can be merged into one destination ImFont)
|
||||||
// (C++03 doesn't allow instancing ImVector<> with function-local types so we declare the type here.)
|
// (C++03 doesn't allow instancing ImVector<> with function-local types so we declare the type here.)
|
||||||
@ -2857,13 +2864,6 @@ static void UnpackBitVectorToFlatIndexList(const ImBitVector* in, ImVector<int>*
|
|||||||
out->push_back((int)(((it - it_begin) << 5) + bit_n));
|
out->push_back((int)(((it - it_begin) << 5) + bit_n));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImFontAtlasBuildGetOversampleFactors(const ImFontConfig* cfg, int* out_oversample_h, int* out_oversample_v)
|
|
||||||
{
|
|
||||||
// Automatically disable horizontal oversampling over size 36
|
|
||||||
*out_oversample_h = (cfg->OversampleH != 0) ? cfg->OversampleH : (cfg->SizePixels * cfg->RasterizerDensity > 36.0f || cfg->PixelSnapH) ? 1 : 2;
|
|
||||||
*out_oversample_v = (cfg->OversampleV != 0) ? cfg->OversampleV : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
|
static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
|
||||||
{
|
{
|
||||||
IM_ASSERT(atlas->ConfigData.Size > 0);
|
IM_ASSERT(atlas->ConfigData.Size > 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user