Skip to content

Commit

Permalink
Remove println
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftSpider committed Apr 17, 2024
1 parent f5753c8 commit d8a9393
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions crates/xetex_layout/src/c_api/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ impl XeTeXLayoutEngineBase {

#[no_mangle]
pub unsafe extern "C" fn deleteLayoutEngine(this: XeTeXLayoutEngine) {
eprintln!("deleteLayoutEngine({:p})", this);
eprintln!("Font: {:p}", &*(*this).font);
eprintln!("Features: {:p}", &*(*this).features);
eprintln!("Shapers: {:p}", &*(*this).shaper_list);
let _ = Box::from_raw(this);
}

Expand Down Expand Up @@ -331,7 +327,6 @@ impl XeTeXLayoutEngineBase {
engine: XeTeXLayoutEngine,
req_first: libc::c_int,
) -> libc::c_int {
eprintln!("getFontCharRange");
if req_first != 0 {
(*engine).font().get_first_char_code() as libc::c_int
} else {
Expand All @@ -344,15 +339,13 @@ impl XeTeXLayoutEngineBase {
engine: XeTeXLayoutEngine,
glyph_name: *const libc::c_char,
) -> libc::c_int {
eprintln!("mapGlyphToIndex");
(*engine)
.font()
.map_glyph_to_index(CStr::from_ptr(glyph_name)) as libc::c_int
}

#[no_mangle]
pub unsafe extern "C" fn usingGraphite(engine: XeTeXLayoutEngine) -> bool {
eprintln!("usingGraphite");
match &(*engine).shaper {
Some(shaper) => shaper.to_bytes() == b"graphite2",
None => false,
Expand Down Expand Up @@ -386,7 +379,6 @@ impl XeTeXLayoutEngineBase {
max: i32,
rtl: bool,
) -> libc::c_int {
eprintln!("layoutChars");
let chars = slice::from_raw_parts(chars, max as usize);
let engine = &mut *engine;

Expand Down Expand Up @@ -536,7 +528,6 @@ pub unsafe extern "C" fn getFontFilename(
engine: XeTeXLayoutEngine,
index: *mut u32,
) -> *const libc::c_char {
eprintln!("getFontFilename");
(*engine)
.font()
.get_filename(&mut *index)
Expand All @@ -546,13 +537,11 @@ pub unsafe extern "C" fn getFontFilename(

#[no_mangle]
pub unsafe extern "C" fn freeFontFilename(filename: *const libc::c_char) {
eprintln!("freeFontFilename");
let _ = CString::from_raw(filename.cast_mut());
}

#[no_mangle]
pub unsafe extern "C" fn getGlyphs(engine: XeTeXLayoutEngine, glyphs: *mut u32) {
eprintln!("getGlyphs");
let hb_glyphs = (*engine).hb_buffer.get_glyph_info();

for (idx, glyph) in hb_glyphs.iter().enumerate() {
Expand All @@ -562,7 +551,6 @@ pub unsafe extern "C" fn getGlyphs(engine: XeTeXLayoutEngine, glyphs: *mut u32)

#[no_mangle]
pub unsafe extern "C" fn getGlyphAdvances(engine: XeTeXLayoutEngine, advances: *mut f32) {
eprintln!("getGlyphAdvances");
let engine = &*engine;
let hb_positions = engine.hb_buffer.get_glyph_position();

Expand All @@ -579,7 +567,6 @@ pub unsafe extern "C" fn getGlyphAdvances(engine: XeTeXLayoutEngine, advances: *

#[no_mangle]
pub unsafe extern "C" fn getGlyphPositions(engine: XeTeXLayoutEngine, positions: *mut FloatPoint) {
eprintln!("getGlyphPositions");
let engine = &mut *engine;
let hb_positions = engine.hb_buffer.get_glyph_position();

Expand Down Expand Up @@ -681,7 +668,6 @@ pub unsafe extern "C" fn getGraphiteFeatureSettingCode(
feature_id: u32,
index: u32,
) -> u32 {
eprintln!("getGraphiteFeatureSettingCode");
get_graphite_feature_setting_code(&*engine, feature_id, index).unwrap_or(0)
}

Expand All @@ -707,7 +693,6 @@ pub unsafe extern "C" fn getGraphiteFeatureDefaultSetting(
engine: XeTeXLayoutEngine,
feature_id: u32,
) -> u32 {
eprintln!("getGraphiteFeatureDefaultSetting");
get_graphite_feature_default_setting(&*engine, feature_id).unwrap_or(0)
}

Expand All @@ -727,7 +712,6 @@ pub unsafe extern "C" fn getGraphiteFeatureLabel(
engine: XeTeXLayoutEngine,
feature_id: u32,
) -> *const libc::c_char {
eprintln!("getGraphiteFeatureLabel");
match get_graphite_feature_label(&*engine, feature_id) {
Some(label) => label.into_raw().cast(),
None => ptr::null_mut(),
Expand Down Expand Up @@ -758,7 +742,6 @@ pub unsafe extern "C" fn getGraphiteFeatureSettingLabel(
feature_id: u32,
setting_id: u32,
) -> *const libc::c_char {
eprintln!("getGraphiteFeatureSettingLabel");
match get_graphite_feature_setting_label(&*engine, feature_id, setting_id) {
Some(label) => label.into_raw().cast(),
None => ptr::null(),
Expand Down Expand Up @@ -811,7 +794,6 @@ pub unsafe extern "C" fn findGraphiteFeature(
f: *mut hb::Tag,
v: *mut libc::c_int,
) -> bool {
eprintln!("findGraphiteFeature");
let len = e.byte_offset_from(s).unsigned_abs();
let str = slice::from_raw_parts(s.cast(), len);
find_graphite_feature(&*engine, str, &mut *f, &mut *v)
Expand Down Expand Up @@ -902,7 +884,6 @@ pub unsafe extern "C" fn initGraphiteBreaking(
txt_ptr: *const u16,
txt_len: libc::c_uint,
) -> bool {
eprintln!("initGraphiteBreaking");
let engine = &*engine;
let hb_font = engine.font().get_hb_font();
let hb_face = hb_font.get_face();
Expand Down Expand Up @@ -952,7 +933,6 @@ pub unsafe extern "C" fn initGraphiteBreaking(

#[no_mangle]
pub unsafe extern "C" fn findNextGraphiteBreak() -> libc::c_int {
eprintln!("findNextGraphiteBreak");
let Some(gr_seg) = GR_SEGMENT.take() else {
return -1;
};
Expand Down

0 comments on commit d8a9393

Please sign in to comment.