I Checked the libharu-RELEASE_2_3_0,there are hpdf_encoder_cns.c,hpdf_encoder_cnt.c,hpdf_encoder_jp.c,hpdf_encoder_utf.c which code support Russian text ?
Does the libharu-RELEASE_2_3_0 support Russian text display?
150 Views Asked by yangkunvanpersie At
3
There are 3 best solutions below
0
On
HPDF_UseUTFEncodings(pdf);
HPDF_SetCurrentEncoder(pdf,"UTF-8");
detail_font_name = HPDF_LoadTTFontFromFile (pdf, "ttfont/arial.ttf", HPDF_TRUE);
title_font = HPDF_GetFont (pdf, "Helvetica", NULL);
detail_font = HPDF_GetFont (pdf, detail_font_name, "UTF-8");
yes,I use this code to generate pdf with Russian.but I have to embed arial.ttf into pdf . And the pdf size is sure large.Is there any solution to solve it ?
0
On
If you just do NOT want to embed used font into your generated PDF document, just use the following:
detail_font_name = HPDF_LoadTTFontFromFile (pdf, "ttfont/arial.ttf", HPDF_FALSE);
The result PDF will not have a font embedded, not even a subset. But this requires the PDF viewer to pick the right glyph.
The UTF-8
hpdf_encoder_utf.cshould support Cyrillic letters.