Skip to content

Commit aeb720d

Browse files
committed
Fix compile error hopefully, remove never-used debug code
1 parent 8692f77 commit aeb720d

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

crates/engine_xetex/xetex/xetex-ext.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ loadOTfont(RawPlatformFontRef fontRef, XeTeXFont font, Fixed scaled_size, char*
510510
}
511511

512512
if (reqEngine == 'G') {
513-
static char* graphiteShaper[] = {"graphite2", NULL};
513+
static const char* graphiteShaper[] = {"graphite2", NULL};
514514
/* create a default engine so we can query the font for Graphite features;
515515
* because of font caching, it's cheap to discard this and create the real one later */
516516
engine = createLayoutEngineBorrowed(font, script, NULL,
@@ -659,7 +659,7 @@ loadOTfont(RawPlatformFontRef fontRef, XeTeXFont font, Fixed scaled_size, char*
659659
setFontLayoutDir(font, 1);
660660

661661
engine = createLayoutEngine(font, script, language,
662-
features, nFeatures, shapers, rgbValue, extend, slant, embolden);
662+
features, nFeatures, (const char**) shapers, rgbValue, extend, slant, embolden);
663663

664664
// The layout engine clones all these - this is temporary to avoid using
665665
// different alloc/dealloc

crates/xetex_layout/src/engine.rs

+26-26
Original file line numberDiff line numberDiff line change
@@ -256,32 +256,32 @@ impl LayoutEngine {
256256

257257
let glyph_count = self.hb_buffer.as_ref().len();
258258

259-
#[cfg(feature = "debug")]
260-
{
261-
use std::ffi::CStr;
262-
263-
let mut buf = [0u8; 1024];
264-
let mut consumed = 0;
265-
println!("shaper: {}", CStr::from_ptr(engine.shaper));
266-
267-
let flags = HB_BUFFER_SERIALIZE_FLAGS_DEFAULT;
268-
let format = HB_BUFFER_SERIALIZE_FORMAT_JSON;
269-
270-
hb_buffer_serialize_glyphs(
271-
engine.hb_buffer,
272-
0,
273-
glyph_count,
274-
&mut buf,
275-
1024,
276-
&mut consumed,
277-
hb_font,
278-
format,
279-
flags,
280-
);
281-
if consumed != 0 {
282-
println!("buffer glyphs: {}", CStr::from_ptr(&buf));
283-
}
284-
}
259+
// #[cfg(feature = "debug")]
260+
// {
261+
// use std::ffi::CStr;
262+
//
263+
// let mut buf = [0u8; 1024];
264+
// let mut consumed = 0;
265+
// println!("shaper: {}", CStr::from_ptr(engine.shaper));
266+
//
267+
// let flags = HB_BUFFER_SERIALIZE_FLAGS_DEFAULT;
268+
// let format = HB_BUFFER_SERIALIZE_FORMAT_JSON;
269+
//
270+
// hb_buffer_serialize_glyphs(
271+
// engine.hb_buffer,
272+
// 0,
273+
// glyph_count,
274+
// &mut buf,
275+
// 1024,
276+
// &mut consumed,
277+
// hb_font,
278+
// format,
279+
// flags,
280+
// );
281+
// if consumed != 0 {
282+
// println!("buffer glyphs: {}", CStr::from_ptr(&buf));
283+
// }
284+
// }
285285

286286
glyph_count
287287
}

0 commit comments

Comments
 (0)