Skip to content

Commit cf4c9c0

Browse files
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.
1 parent b2fdaf4 commit cf4c9c0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

core-graphics/src/context.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::font::{CGFont, CGGlyph};
1414
use crate::geometry::{CGPoint, CGSize};
1515
use crate::gradient::{CGGradient, CGGradientDrawingOptions};
1616
use crate::path::CGPathRef;
17-
use core::ffi::{c_int, c_void};
17+
use core::ffi::c_void;
1818
use core_foundation::base::{CFTypeID, TCFType};
1919

2020
use crate::geometry::{CGAffineTransform, CGRect};
@@ -223,12 +223,6 @@ impl CGContextRef {
223223
unsafe { CGContextSetAllowsFontSmoothing(self.as_ptr(), allows_font_smoothing) }
224224
}
225225

226-
pub fn set_font_smoothing_style(&self, style: i32) {
227-
unsafe {
228-
CGContextSetFontSmoothingStyle(self.as_ptr(), style as _);
229-
}
230-
}
231-
232226
pub fn set_should_smooth_fonts(&self, should_smooth_fonts: bool) {
233227
unsafe { CGContextSetShouldSmoothFonts(self.as_ptr(), should_smooth_fonts) }
234228
}
@@ -639,7 +633,6 @@ extern "C" {
639633
fn CGContextSetBlendMode(c: crate::sys::CGContextRef, blendMode: CGBlendMode);
640634
fn CGContextSetAllowsFontSmoothing(c: crate::sys::CGContextRef, allowsFontSmoothing: bool);
641635
fn CGContextSetShouldSmoothFonts(c: crate::sys::CGContextRef, shouldSmoothFonts: bool);
642-
fn CGContextSetFontSmoothingStyle(c: crate::sys::CGContextRef, style: c_int);
643636
fn CGContextSetAllowsAntialiasing(c: crate::sys::CGContextRef, allowsAntialiasing: bool);
644637
fn CGContextSetShouldAntialias(c: crate::sys::CGContextRef, shouldAntialias: bool);
645638
fn CGContextSetAllowsFontSubpixelQuantization(

0 commit comments

Comments
 (0)