项目符号采用ZapfDingbats字体

This commit is contained in:
csh
2024-11-13 17:40:46 +08:00
parent 003268fd40
commit 5652980a97
3 changed files with 38 additions and 30 deletions
+10 -4
View File
@@ -498,10 +498,15 @@ begin
a_word := text[pos : pos+num-1];
word := utf8ToAnsi(a_word);
if num <> 1 and word = "?" then
word := utf8ToAnsi(docx_to_pdf_.GetSymbol(a_word));
pos += num;
font_name := rpr.RFonts.EastAsia ? rpr.RFonts.EastAsia : rpr.RFonts.Ascii;
font_obj := docx_to_pdf_.Font.GetCNSFont(font_name, rpr.B, rpr.I);
begin
word := docx_to_pdf_.GetSymbol(a_word);
if ifnil(word) then word := "u";
font_obj := docx_to_pdf_.Font.GetSymbolFont();
end
else begin
font_name := rpr.RFonts.EastAsia ? rpr.RFonts.EastAsia : rpr.RFonts.Ascii;
font_obj := docx_to_pdf_.Font.GetCNSFont(font_name, rpr.B, rpr.I);
end
if not rpr.Sz.Val then rpr.Sz.Val := rpr.SzCs.Val ? rpr.SzCs.Val : docx_to_pdf_.Font.GetDefaultSz();
page_.PdfPage.SetFontAndSize(font_obj, rpr.Sz.Val);
word_width := page_.PdfPage.TextWidth(word);
@@ -512,6 +517,7 @@ begin
text_range.Width := word_width;
range_array_[length(range_array_)] := text_range;
if ifarray(bookmark_array_[link]) then bookmark_array_[link] union= array(text_range);
pos += num;
end
end;