{"action":"opened","issue":{"url":"https://api.github.com/repos/behdad/harfbuzz/issues/370","repository_url":"https://api.github.com/repos/behdad/harfbuzz","labels_url":"https://api.github.com/repos/behdad/harfbuzz/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/behdad/harfbuzz/issues/370/comments","events_url":"https://api.github.com/repos/behdad/harfbuzz/issues/370/events","html_url":"https://github.com/behdad/harfbuzz/issues/370","id":193477106,"number":370,"title":"hb_font_get_glyph_name returns null","user":{"login":"SamehMahmoud","id":8081393,"avatar_url":"https://avatars.githubusercontent.com/u/8081393?v=3","gravatar_id":"","url":"https://api.github.com/users/SamehMahmoud","html_url":"https://github.com/SamehMahmoud","followers_url":"https://api.github.com/users/SamehMahmoud/followers","following_url":"https://api.github.com/users/SamehMahmoud/following{/other_user}","gists_url":"https://api.github.com/users/SamehMahmoud/gists{/gist_id}","starred_url":"https://api.github.com/users/SamehMahmoud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamehMahmoud/subscriptions","organizations_url":"https://api.github.com/users/SamehMahmoud/orgs","repos_url":"https://api.github.com/users/SamehMahmoud/repos","events_url":"https://api.github.com/users/SamehMahmoud/events{/privacy}","received_events_url":"https://api.github.com/users/SamehMahmoud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-05T11:50:26Z","updated_at":"2016-12-05T11:50:26Z","closed_at":null,"body":"hello\r\nI'm getting null/empty values from hb_font_get_glyph_name\r\n\r\nhere is my code :\r\n\r\nint array_size=1024*59;\r\n    char * array = new char[array_size];\r\n    int pos = 0;\r\n    ifstream fin(\"/home/sameh/Desktop/K-Sina.ttf\" , ios::binary);\r\n    if(fin.is_open()){\r\n        cout << \"File is opended\" << endl;\r\n        fin.read(array, 1024*58);\r\n\r\n    hb_blob_t * blob;\r\n\r\n    blob = hb_blob_create(array , array_size , HB_MEMORY_MODE_READONLY, NULL , NULL);\r\n\r\n    hb_face_t * faceX;\r\n\r\n    faceX = hb_face_create(blob , 0);\r\n\r\n    hb_font_t * fontX = hb_font_create(faceX);\r\n\r\n    hb_ot_font_set_funcs(fontX);\r\n\r\n    hb_buffer_t * buffer;\r\n\r\n    buffer = hb_buffer_create();\r\n\r\n    string text = \"سامح\";\r\n\r\n    size_t length = text.size();\r\n\r\n    hb_buffer_add_utf8(buffer,text.c_str(),length,0,length);\r\n\r\n    hb_buffer_guess_segment_properties(buffer);\r\n\r\n    hb_ot_font_set_funcs(fontX);\r\n\r\n    hb_shape(fontX , buffer , NULL , 0);\r\n\r\n    unsigned int count;\r\n\r\n    hb_glyph_info_t * glyph_info = hb_buffer_get_glyph_infos(buffer,&count);\r\n\r\n    hb_glyph_position_t * glyph_position = hb_buffer_get_glyph_positions(buffer , &count);\r\n\r\n    cout << \"count is \" << count << endl;\r\n\r\n    cout << \"glyph = \" << glyph_info[1].codepoint << endl;\r\n\r\n    char * name = new char;\r\n\r\n    hb_font_get_glyph_name(fontX , glyph_info[1].codepoint , name , 10);\r\n\r\n    cout << \"glyph = \" << name << endl; // prints out \"glyph=\" !!\r\n\r\n    fin.close();\r\n\r\n}"}}
{"actor":{"display_login":"SamehMahmoud"}}