---
name: "FcWeightFromOpenTypeDouble"
section: "3"
platform: "linux"
package: "fontconfig"
version: "2:2.18.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/FcWeightFromOpenTypeDouble"
---

# FcWeightFromOpenTypeDouble(3)

Convert from OpenType weight values to fontconfig ones

## NAME

FcWeightFromOpenTypeDouble - Convert from OpenType weight values to fontconfig ones

## SYNOPSIS

**#include \<fontconfig/fontconfig.h\>**

**double FcWeightFromOpenTypeDouble (double** *ot\_weight***);**

## DESCRIPTION

**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
