From 36623f13d922461c897fe0ae1ff550a073385329 Mon Sep 17 00:00:00 2001 From: Roozbeh Pournader Date: Tue, 13 Jan 2015 08:50:27 -0800 Subject: Add FreeType python bindings to third_party. --- .../freetype/ft_enums/ft_lcd_filters.py | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 third_party/freetype-py/freetype/ft_enums/ft_lcd_filters.py (limited to 'third_party/freetype-py/freetype/ft_enums/ft_lcd_filters.py') diff --git a/third_party/freetype-py/freetype/ft_enums/ft_lcd_filters.py b/third_party/freetype-py/freetype/ft_enums/ft_lcd_filters.py new file mode 100644 index 0000000..355b190 --- /dev/null +++ b/third_party/freetype-py/freetype/ft_enums/ft_lcd_filters.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# ----------------------------------------------------------------------------- +# +# FreeType high-level python API - Copyright 2011-2012 Nicolas P. Rougier +# Distributed under the terms of the new BSD license. +# +# ----------------------------------------------------------------------------- + +""" +A list of values to identify various types of LCD filters. + + +FT_LCD_FILTER_NONE + + Do not perform filtering. When used with subpixel rendering, this results in + sometimes severe color fringes. + + +FT_LCD_FILTER_DEFAULT + + The default filter reduces color fringes considerably, at the cost of a + slight blurriness in the output. + + +FT_LCD_FILTER_LIGHT + + The light filter is a variant that produces less blurriness at the cost of + slightly more color fringes than the default one. It might be better, + depending on taste, your monitor, or your personal vision. + + +FT_LCD_FILTER_LEGACY + + This filter corresponds to the original libXft color filter. It provides high + contrast output but can exhibit really bad color fringes if glyphs are not + extremely well hinted to the pixel grid. In other words, it only works well + if the TrueType bytecode interpreter is enabled and high-quality hinted fonts + are used. + + This filter is only provided for comparison purposes, and might be disabled + or stay unsupported in the future. +""" + +FT_LCD_FILTERS = {'FT_LCD_FILTER_NONE' : 0, + 'FT_LCD_FILTER_DEFAULT' : 1, + 'FT_LCD_FILTER_LIGHT' : 2, + 'FT_LCD_FILTER_LEGACY' : 16} +globals().update(FT_LCD_FILTERS) + + -- cgit v1.2.3