Skip to content

Commit

Permalink
core-graphics: remove set_font_smoothing_style API, closes #707 (#709)
Browse files Browse the repository at this point in the history
The `CGContextSetFontSmoothingStyle` API is private, and Apple rejects it for the App Store.

See #707 for more information.
  • Loading branch information
lucasfernog-crabnebula committed Aug 30, 2024
1 parent b2fdaf4 commit cf4c9c0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions core-graphics/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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) }
}
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit cf4c9c0

Please sign in to comment.