Japanese font with Bold font in fpPDF lazarus / 62-General ---------------------------------------------------------------------- meeeeeeeeee · 2025-04-04 06:36 Hello. I can make a PDF file with Japanese font, but I'm struggline with BOLD font. In using "Yu Mincho Demibold" I can make Japanese font to kind of BOLD font, but I can't make gothic font to BOLD font in Japanese. I'd like use "Noto" series font possibly for BOLD font. Can anyone help me how to use BOLD fond in fppdf? I'm using Lazarus v3.8. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses ...fppdf, fpttf, LCLIntf,custapp  procedure TForm1.Button1Click(Sender: TObject);var  xFpFcl   : TFPFontCacheList;   xPdfDoc: TPDFDocument;  xPdfSec: TPDFSection;   xPdfPg : TPDFPage;      xString:String;  xFt_NotoSerifJP :integer;   procedure AddPage;  begin    xPdfPg                 := xPdfDoc.Pages.AddPage;    xPdfPg.PaperType       := ptA4;    xPdfPg.Orientation   := ppoLandScape;      xPdfPg.UnitOfMeasure := uomPixels;       xPdfSec.AddPage(xPdfPg);  end;  procedure AddFontsToPDFDoc(var d: TPDFDocument);  const    xFontAry: array [0..2] of String = ('Noto Sans JP', 'Noto Serif JP', 'Yu Mincho Demibold');  var    i, xCnt: Integer;    xFpFci: TFPFontCacheItem;  begin    xCnt :=0;    for i := 0 to High(xFontAry) do  begin      xFpFci := xFpFcl.Find(xFontAry[i], False, False);      if xFpFci <> nil then begin        xPdfDoc.AddFont(xFpFci.FileName, xFpFci.FamilyName);        xCnt :=xCnt+1;      end;    end;    if (xCnt = 0) and (xFpFcl.Count > 0) then begin      xFpFci := xFpFcl.Items[0];      xPdfDoc.AddFont(xFpFci.FileName, xFpFci.FamilyName);    end;  end;begin  //load fonts  xFpFcl := TFPFontCacheList.Create;  xFpFcl.SearchPath.Add('C:\Windows\Fonts');  xFpFcl.BuildFontCache;  xFpFcl.ReadStandardFonts;   //doc  xPdfDoc                     := TPDFDocument.Create(nil);  xPdfDoc.Options             := [poPageOriginAtTop];  xPdfDoc.StartDocument;  xPdfSec                     := xPdfDoc.Sections.AddSection;  AddFontsToPDFDoc(xPdfDoc);   AddPage;   //xFt_NotoSerifJP := xPdfDoc.AddFont('NotoSerifJP-VF.ttf', 'Noto Serif JP');  xFt_NotoSerifJP := xPdfDoc.AddFont('yumindb.ttf', 'Yu Mincho Demibold');     xPdfPg.SetFont(xFt_NotoSerifJP, 13);  xPdfPg.SetColor(clBlack, false);   xString :='1行目。あいうえおガギグゲゴパピプペポ';  xPdfPg.WriteText(50, 50, xString);   xString :='2行目';  xPdfPg.WriteText(50, 60, xString);   xPdfDoc.SaveToFile('aaa.pdf');  xPdfDoc.free;  OpenDocument('aaa.pdf');  close;end; ---------------------------------------------------------------------- paweld · 2025-04-04 10:22 Hi, read this thread: https://forum.lazarus.freepascal.org/index.php/topic,68657.0.html you will find some examples there ---------------------------------------------------------------------- meeeeeeeeee · 2025-04-08 05:38 Hi, paweld. By installing NotoSansJP-Bold.ttf and using HumanFriendlyName, I can use "Noto Sans JP Bold". Thank you.