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.
This commit is contained in:
Lucas Nogueira
2024-08-30 17:03:51 -03:00
committed by GitHub
parent b2fdaf4132
commit cf4c9c06c5
+1 -8
View File
@@ -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(