<div dir="ltr">Hi all,<div><br></div><div>I'm trying to pinpoint a problem with my project implementation (if someone can find the source of the problem or guide me in the right direction - hopefully I forgot a define or something similar)</div><div><br></div><div>here is what I'm printing:</div><div><br></div><div><div>hb_glyph_info_t *glyphInfo = hb_buffer_get_glyph_infos(buffer, &glyphCount);</div><div>hb_glyph_position_t *glyphPos = hb_buffer_get_glyph_positions(buffer, &glyphCount);</div><div>    </div><div>for(i = 0, i < glyphCount; i++) {</div><div>    printf("codepoint %d:\n   advance: %f, %f\n   offset: %f, %f\n",</div><div>           glyphInfo[i].codepoint,</div><div>           (float)glyphPos[i].x_advance, (float)glyphPos[i].y_advance,</div><div>           (float)glyphPos[i].x_offset, (float)glyphPos[i].y_offset);</div><div>}</div><div><br></div><div>input text: कुछ सिक्के</div><div>font size: 100</div><div>font: NotoSansDevanagari-Medium.ttf</div><div><br></div><div>and here is the comparison between my project and harfbuzz example<br></div><div><br></div><div>my project<span class="gmail-Apple-tab-span" style="white-space:pre">                     </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> harfbuzz example<span class="gmail-Apple-tab-span" style="white-space:pre">     </span></div><div>------------------------------------------------------------------------</div><div>codepoint 25:<span class="gmail-Apple-tab-span" style="white-space:pre">                   </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 25:</div><div>   advance: 4992, 0<span class="gmail-Apple-tab-span" style="white-space:pre">            </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 4992, 0</div><div>   offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">  </span></div><div>codepoint 69:<span class="gmail-Apple-tab-span" style="white-space:pre">                  </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 69:</div><div>   advance: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">               </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre"> </span></div><div>   offset: -4992, 0<span class="gmail-Apple-tab-span" style="white-space:pre">          </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: -1428, 0</div><div>codepoint 31:<span class="gmail-Apple-tab-span" style="white-space:pre">                  </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 31:</div><div>   advance: 4595, 0<span class="gmail-Apple-tab-span" style="white-space:pre">            </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 4595, 0</div><div>   offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">  </span></div><div>codepoint 3:<span class="gmail-Apple-tab-span" style="white-space:pre">                   </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 3:</div><div>   advance: 1664, 0<span class="gmail-Apple-tab-span" style="white-space:pre">             </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 1664, 0</div><div>   offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">  </span></div><div>codepoint 609:<span class="gmail-Apple-tab-span" style="white-space:pre">         </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 609:</div><div>   advance: 1722, 0<span class="gmail-Apple-tab-span" style="white-space:pre">           </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 1722, 0</div><div>   offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">  </span></div><div>codepoint 60:<span class="gmail-Apple-tab-span" style="white-space:pre">                  </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 60:</div><div>   advance: 4454, 0<span class="gmail-Apple-tab-span" style="white-space:pre">            </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 4454, 0</div><div>   offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">  </span></div><div>codepoint 183:<span class="gmail-Apple-tab-span" style="white-space:pre">         </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 183:</div><div>   advance: 3962, 0<span class="gmail-Apple-tab-span" style="white-space:pre">           </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 3553, 0</div><div>   offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">  </span></div><div>codepoint 25:<span class="gmail-Apple-tab-span" style="white-space:pre">                  </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 25:</div><div>   advance: 4992, 0<span class="gmail-Apple-tab-span" style="white-space:pre">            </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 4992, 0</div><div>   offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">  </span></div><div>codepoint 75:<span class="gmail-Apple-tab-span" style="white-space:pre">                  </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> codepoint 75:</div><div>   advance: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre">               </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>advance: 0, 0<span class="gmail-Apple-tab-span" style="white-space:pre"> </span></div><div>   offset: -4992, 0<span class="gmail-Apple-tab-span" style="white-space:pre">          </span>|<span class="gmail-Apple-tab-span" style="white-space:pre">     </span> <span class="gmail-Apple-tab-span" style="white-space:pre">     </span>offset: -1428, 0</div><div><br></div><div>as you can see the diff is:</div><div>codepoint: 69 => offset</div><div>codepoint: 183 => advance<br></div><div>codepoint: 75 => offset<br></div><div><br></div><div>harfbuzz example (on the right) is obviously working as it should but I can't figure out what I am doing wrong since this is harfbuzz code...</div><div><br></div><div>I've tried building harfbuzz with version 1.7.4 and 1.2.4 (like harfbuzz example) ending in same result.. and thats why I hope I just forgot a define or something similar... </div><div><br></div><div>Any help or push in the right directions will help a lot.</div><div><br></div><div>Thank you in advance!</div><div><br></div><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Best regards,</div><div>Jani Brezavšček</div><div dir="ltr"><br></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>