Hi !
I'm trying to extract the outlines of a font using camlimage but
I cannot get anything out of it. Whatever the ".ttf" font file I try,
I invariable get no points. Here is an example :
let font_file = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf";;
let (face, face_info) = new_face lib font_file 0;;
val face : Freetype.face = <abstr>
val face_info : Freetype.face_info =
{num_faces = 1; num_glyphs = 2890; family_name = "DejaVu Serif";
style_name = "Book"; has_horizontal = true; has_vertical = false;
has_kerning = true; is_scalable = true; is_sfnt = true;
is_fixed_width = false; has_fixed_sizes = false; has_fast_glyphs = false;
has_glyph_names = true; has_multiple_masters = false}
(* Looks good up to here *)
let outline_content = get_outline_contents face ;;
val outline_content : Freetype.outline_contents =
{n_contours = 0; n_points = 0; points = [||]; tags = [||]; contours = [||]}
Did I missed something, or is this function not working properly (as some comment
in the code suggest :-)), or maybe I'm not supplying the correct kind of file ?
Also, I couldn't find any sample of a working program using it. Do you know of some ?
Thank you for any help.