fcft_set_scaling_filter(3)

✨ fcft_set_scaling_filter(3) ✨

okay so bestie, welcome to the fcft corner of the manual β€” this one's all about fcft_set_scaling_filter, and it's genuinely a little glow-up button for your bitmap fonts πŸŽ€


🌸 NAME 🌸

fcft_set_scaling_filter β€” configures the filter to use when downscaling bitmap fonts


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <fcft/fcft.h>

bool fcft_set_scaling_filter(enum fcft_scaling_filter filter);

πŸ’… DESCRIPTION πŸ’…

So fcft_set_scaling_filter() is the function that configures the filter the use when downscaling bitmap fonts (typically emoji fonts, iykyk πŸ’–). Heads up though β€” this setting is a global mood, it affects all font instances, not just one.

⚠️ fr fr read this part: this function does not clear the glyph caches, so you should call it before any calls to fcft_codepoint_rasterize(). Caching comes for you if you're late πŸ’€

Possible values for filter are, and yes we're listing all of them, no skips:

  • FCFT_SCALING_FILTER_NONE
  • FCFT_SCALING_FILTER_NEAREST
  • FCFT_SCALING_FILTER_BILINEAR
  • FCFT_SCALING_FILTER_IMPULSE
  • FCFT_SCALING_FILTER_BOX
  • FCFT_SCALING_FILTER_LINEAR
  • FCFT_SCALING_FILTER_CUBIC
  • FCFT_SCALING_FILTER_GAUSSIAN
  • FCFT_SCALING_FILTER_LANCZOS2
  • FCFT_SCALING_FILTER_LANCZOS3
  • FCFT_SCALING_FILTER_LANCZOS3_STRETCHED

Now let's break down the vibes 🌈:

  • FCFT_SCALING_FILTER_NONE β€” disables filtering. that's it, that's the whole personality, no filter no problem 🫢
  • FCFT_SCALING_FILTER_NEAREST and FCFT_SCALING_FILTER_BILINEAR β€” these two are the traditional filters, and nearest is the fastest of the bunch ⚑
  • the rest? separable convolution filters. iconic behaviour honestly πŸ‘‘

And if you never call this function at all? fcft just defaults to FCFT_SCALING_FILTER_CUBIC. she picked for you πŸ’œ


⭐ RETURN VALUE ⭐

On success, fcft_set_scaling_filter() returns true. On error, false is returned. simple as that πŸŽ€


πŸ“ EXAMPLE πŸ“

See fcft_from_name() β€” go check that one out, it's got the whole demo 🧚


and that's a wrap on this page bestie!! πŸ’– this was fcft_set_scaling_filter(3) from the fcft manual, version 3.3.3, dated 2026-04-09 β€” slay, go filter those emoji fonts, mwah 🫢✨

πŸ“¦ where this page comes from