summaryrefslogtreecommitdiffstats
path: root/libass/ass_fontselect.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2011-08-19 01:16:24 +0200
committerGrigori Goronzy <greg@chown.ath.cx>2015-07-10 10:42:40 +0200
commit93c4e8ebf3dea5c9e1978f78a33cb961d6a1aaf7 (patch)
tree10adc9f34146192dafdf6ab158f4022ed2acff3f /libass/ass_fontselect.h
parent986605e29d9d8c7a0d0aeac8f53fc556097334d6 (diff)
downloadlibass-93c4e8ebf3dea5c9e1978f78a33cb961d6a1aaf7.tar.bz2
libass-93c4e8ebf3dea5c9e1978f78a33cb961d6a1aaf7.tar.xz
Use TrueType font weight scale
fontconfig uses an unusual scale from 0-215 for the font weight. It looks like it is somewhat derived from the typographic scale some font families use, but is still rather nonstandard. Nowadays the TrueType scale from 100-900 seems to be standard. CSS uses it, for example. However, most importantly, VSFilter also uses the TrueType scale. So let's use it in libass, too.
Diffstat (limited to 'libass/ass_fontselect.h')
-rw-r--r--libass/ass_fontselect.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libass/ass_fontselect.h b/libass/ass_fontselect.h
index 651968d..05359a8 100644
--- a/libass/ass_fontselect.h
+++ b/libass/ass_fontselect.h
@@ -49,6 +49,10 @@ typedef struct font_provider_funcs {
DestroyProviderFunc destroy_provider;
} ASS_FontProviderFuncs;
+#define FONT_WEIGHT_LIGHT 300
+#define FONT_WEIGHT_MEDIUM 400
+#define FONT_WEIGHT_BOLD 700
+
typedef struct font_provider_meta_data {
char *family;
char **fullnames;