Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML List works #1 #1524

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

add FIXME: glyph_count is depending on the font.

  • Loading branch information
recrack committed Jan 27, 2014
commit bad39659b89625f3880ec5bf6a1f7656a62a2915
@@ -64,17 +64,14 @@ pub struct ShapedGlyphEntry {
impl ShapedGlyphData {
pub fn new(buffer: *hb_buffer_t) -> ShapedGlyphData {
unsafe {
let glyph_count = 0;
let glyph_count = 0 as c_uint;
let glyph_infos = hb_buffer_get_glyph_infos(buffer, &glyph_count);
let glyph_count = glyph_count as uint;
assert!(glyph_infos.is_not_null());
let pos_count = 0;
let pos_infos = hb_buffer_get_glyph_positions(buffer, &pos_count);
let pos_infos = hb_buffer_get_glyph_positions(buffer, &glyph_count);
assert!(pos_infos.is_not_null());
assert!(glyph_count == pos_count as uint);

ShapedGlyphData {
count: glyph_count,
count: glyph_count as uint,
glyph_infos: glyph_infos,
pos_infos: pos_infos,
}
@@ -231,7 +228,11 @@ impl Shaper {
// so, we must be careful to increment this when saving glyph entries.
let mut char_idx = 0;

assert!(glyph_count <= char_max);
// FIXME(recrack) : glyph_count is depending on the font.
// Example : (I, II is roman upper character unicode)
// I = glyph_count(1u), char_max(1u)
// II = glyph_count(2u), char_max(1u)
//assert!(glyph_count <= char_max);

debug!("Shaped text[char count={:u}], got back {:u} glyph info records.",
char_max,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.