forked from external/yambar
font: rename 'size' -> 'pixel_size'
This commit is contained in:
parent
b48365aa86
commit
feddc19b36
1 changed files with 3 additions and 3 deletions
6
font.c
6
font.c
|
@ -177,8 +177,8 @@ from_font_set(FcPattern *pattern, FcFontSet *fonts, int start_idx,
|
||||||
if (FcPatternGetDouble(final_pattern, FC_DPI, 0, &dpi) != FcResultMatch)
|
if (FcPatternGetDouble(final_pattern, FC_DPI, 0, &dpi) != FcResultMatch)
|
||||||
dpi = 96;
|
dpi = 96;
|
||||||
|
|
||||||
double size;
|
double pixel_size;
|
||||||
if (FcPatternGetDouble(final_pattern, FC_PIXEL_SIZE, 0, &size)) {
|
if (FcPatternGetDouble(final_pattern, FC_PIXEL_SIZE, 0, &pixel_size)) {
|
||||||
LOG_ERR("%s: failed to get size", face_file);
|
LOG_ERR("%s: failed to get size", face_file);
|
||||||
FcPatternDestroy(final_pattern);
|
FcPatternDestroy(final_pattern);
|
||||||
return false;
|
return false;
|
||||||
|
@ -201,7 +201,7 @@ from_font_set(FcPattern *pattern, FcFontSet *fonts, int start_idx,
|
||||||
if (ft_err != 0)
|
if (ft_err != 0)
|
||||||
LOG_ERR("%s: failed to create FreeType face", face_file);
|
LOG_ERR("%s: failed to create FreeType face", face_file);
|
||||||
|
|
||||||
if ((ft_err = FT_Set_Char_Size(ft_face, size * 64, 0, 0, 0)) != 0)
|
if ((ft_err = FT_Set_Char_Size(ft_face, pixel_size * 64, 0, 0, 0)) != 0)
|
||||||
LOG_WARN("failed to set character size");
|
LOG_WARN("failed to set character size");
|
||||||
|
|
||||||
FcBool fc_hinting;
|
FcBool fc_hinting;
|
||||||
|
|
Loading…
Add table
Reference in a new issue