1
0
mirror of https://github.com/ocornut/imgui.git synced 2025-02-02 12:37:20 +01:00

Fonts: OversampleH auto-selection uses 36 as heuristic for now.

This commit is contained in:
ocornut 2025-01-24 20:03:04 +01:00
parent 8a1613a382
commit afb6e9a879

View File

@ -2859,8 +2859,8 @@ static void UnpackBitVectorToFlatIndexList(const ImBitVector* in, ImVector<int>*
void ImFontAtlasBuildGetOversampleFactors(const ImFontConfig* cfg, int* out_oversample_h, int* out_oversample_v) void ImFontAtlasBuildGetOversampleFactors(const ImFontConfig* cfg, int* out_oversample_h, int* out_oversample_v)
{ {
// Automatically disable horizontal oversampling over size 32 // Automatically disable horizontal oversampling over size 36
*out_oversample_h = (cfg->OversampleH != 0) ? cfg->OversampleH : (cfg->SizePixels * cfg->RasterizerDensity > 32.0f || cfg->PixelSnapH) ? 1 : 2; *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; *out_oversample_v = (cfg->OversampleV != 0) ? cfg->OversampleV : 1;
} }