Start work on rendering fonts using FreeType

This commit is contained in:
Kovid Goyal
2016-10-23 23:12:00 +05:30
parent 6f81e12041
commit 6a23dbe1ec
37 changed files with 6064 additions and 19 deletions

14
glfw.py
View File

@@ -36,6 +36,7 @@
import os
import ctypes.util
from collections import namedtuple
from ctypes import (Structure, POINTER, CFUNCTYPE, byref, c_char_p, c_int,
c_uint, c_double, c_float, c_ushort)
@@ -580,15 +581,14 @@ def glfwGetMonitorPhysicalSize(monitor):
return width.value, height.value
VideoMode = namedtuple('VideoMode', 'width height redBits blueBits greenBits refreshRate')
def glfwGetVideoMode(monitor):
_glfw.glfwGetVideoMode.restype = POINTER(GLFWvidmode)
c_mode = _glfw.glfwGetVideoMode(monitor)
return (c_mode.width,
c_mode.height,
c_mode.redBits,
c_mode.blueBits,
c_mode.greenBits,
c_mode.refreshRate)
c_mode = _glfw.glfwGetVideoMode(monitor).contents
return VideoMode(
c_mode.width, c_mode.height, c_mode.redBits, c_mode.blueBits, c_mode.greenBits, c_mode.refreshRate)
def GetGammaRamp(monitor):