FcWeightFromOpenTypeDouble(3)

FcWeightFromOpenTypeDouble3

Convert from opentype weight values to fontconfig ones

Usage

#include <fontconfig/fontconfig.h>

double FcWeightFromOpenTypeDouble (double ot_weight);

Overview

FcWeightFromOpenTypeDouble returns an double value to use with FC_WEIGHT, from an double in the 1..1000 range, resembling the numbers from OpenType specification's OS/2 usWeight numbers, which are also similar to CSS font-weight numbers. If input is negative, zero, or greater than 1000, returns -1. This function linearly interpolates between various FC_WEIGHT_* constants. As such, the returned value does not necessarily match any of the predefined constants.

Since

version 2.12.92

Releases

5 releases since Debian 10 (Buster); the text changed 4 times.

  1. 10
  2. 11
  3. 12
  4. 13
  5. Arch

From fontconfig 2:2.18.3-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.