From 23dbf721547f652d4afa42e505c7703dfb927a47 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Fri, 24 Jun 2016 21:52:32 -0700 Subject: Fix subpixel rendering for macOS This adds a bunch of APIs to CGContext (and supporting types) that aren't actually necessary to turn on subpixel rendering. The key for subpixel rendering were the options passed to bitmap_context_create(). Specifically, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host are necessary to enable it. --- font/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'font/src/lib.rs') diff --git a/font/src/lib.rs b/font/src/lib.rs index ba632bee..bd485ff0 100644 --- a/font/src/lib.rs +++ b/font/src/lib.rs @@ -10,8 +10,6 @@ extern crate fontconfig; #[cfg(not(target_os = "macos"))] extern crate freetype; -#[cfg(not(target_os = "macos"))] -extern crate libc; #[cfg(target_os = "macos")] extern crate core_text; @@ -23,6 +21,7 @@ extern crate core_foundation_sys; extern crate core_graphics; extern crate euclid; +extern crate libc; use std::fmt; -- cgit v1.2.3-54-g00ecf