From cf4c9c06c50ac259036fe2087353a6fef8cf0d27 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com> Date: Fri, 30 Aug 2024 17:03:51 -0300 Subject: [PATCH] core-graphics: remove set_font_smoothing_style API, closes #707 (#709) The `CGContextSetFontSmoothingStyle` API is private, and Apple rejects it for the App Store. See #707 for more information. --- core-graphics/src/context.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/core-graphics/src/context.rs b/core-graphics/src/context.rs index 19e61915..a2fe326e 100644 --- a/core-graphics/src/context.rs +++ b/core-graphics/src/context.rs @@ -14,7 +14,7 @@ use crate::font::{CGFont, CGGlyph}; use crate::geometry::{CGPoint, CGSize}; use crate::gradient::{CGGradient, CGGradientDrawingOptions}; use crate::path::CGPathRef; -use core::ffi::{c_int, c_void}; +use core::ffi::c_void; use core_foundation::base::{CFTypeID, TCFType}; use crate::geometry::{CGAffineTransform, CGRect}; @@ -223,12 +223,6 @@ impl CGContextRef { unsafe { CGContextSetAllowsFontSmoothing(self.as_ptr(), allows_font_smoothing) } } - pub fn set_font_smoothing_style(&self, style: i32) { - unsafe { - CGContextSetFontSmoothingStyle(self.as_ptr(), style as _); - } - } - pub fn set_should_smooth_fonts(&self, should_smooth_fonts: bool) { unsafe { CGContextSetShouldSmoothFonts(self.as_ptr(), should_smooth_fonts) } } @@ -639,7 +633,6 @@ extern "C" { fn CGContextSetBlendMode(c: crate::sys::CGContextRef, blendMode: CGBlendMode); fn CGContextSetAllowsFontSmoothing(c: crate::sys::CGContextRef, allowsFontSmoothing: bool); fn CGContextSetShouldSmoothFonts(c: crate::sys::CGContextRef, shouldSmoothFonts: bool); - fn CGContextSetFontSmoothingStyle(c: crate::sys::CGContextRef, style: c_int); fn CGContextSetAllowsAntialiasing(c: crate::sys::CGContextRef, allowsAntialiasing: bool); fn CGContextSetShouldAntialias(c: crate::sys::CGContextRef, shouldAntialias: bool); fn CGContextSetAllowsFontSubpixelQuantization(