惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
D
DataBreaches.Net
F
Full Disclosure
腾讯CDC
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
The Register - Security
The Register - Security
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
J
Java Code Geeks
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
博客园 - 三生石上(FineUI控件)
Know Your Adversary
Know Your Adversary
AWS News Blog
AWS News Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CERT Recently Published Vulnerability Notes
O
OpenAI News
Project Zero
Project Zero
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
Schneier on Security
Schneier on Security

博客园 - 后凤凰

nodejs在linux系统调用lazarus编辑的so文件 node使用koffi load dll卡死 Tencoding with out BOM lazarus配置记录 ubuntu20.10安装scrcpy 背诵小鹤双拼 FireBird DataType TFDManager不能在Dll中创建线程池 cxGrid导出到图片 delphi安装package时无法定位程序输入点bpl Delphi fastreport乱码处理 electron14之后版本使用remote - 后凤凰 - 博客园 electron-edge-js编译 - 后凤凰 - 博客园 delphi 10.4.2 启动时报错 socket error go特点 elecron调用C#dll Delphi Records与classes几点不同 electron 14 remote使用 - 后凤凰 anbox
lazarus fastreport导出pdf Cant swap font
后凤凰 · 2025-09-04 · via 博客园 - 后凤凰
  • 主要是frxLinuxFonts.pas。其会从配置的目录当中加载ttf字体。ttc类型的字体加载不了。
  • 如果只给当前用户使用的话可以在用户目录下创建.fonts目录,然后把ttf复制到目录当中并刷新字体缓存
  •   //刷新字体缓存
      fc-cache -fv ~/.fonts
      
      
      //查看系统中的中文字体
      fc-list : lang=zh-cn
    
  • 参考 字体问题处理
  • 根据参考中的信息修改单元中的信息。但是问题稍有不同.这里不知什么原因Font.name没有正常编码,需要做类型转换。应该是因为使用的是老版本的报表格式
  •   {$ifdef linux}
        familyItem := FontCollection.Family[Font.Name];
        if familyItem=nil then
        begin
          lfname:=Font.Name;
          //中文字体名称
          if SameText(lfname,'宋体') then
            lfname:='SimSun'
          else if SameText(lfname,'黑体') then
            lfname:='SimHei'
          else if SameText(lfname,'楷体') then
            lfname:='KaiTi'
          else if SameText(lfname,'仿宋_GB2312') then
            lfname:='FangSong_GB2312'
          else if SameText(lfname,'楷体_GB2312') then
            lfname:='KaiTi_GB2312'
          else if SameText(lfname,'幼圆') then
            lfname:='YouYuan'
          else if SameText(lfname,'新宋体') then
            lfname:='NSimSun'
          else if SameText(lfname,'隶书') then
            lfname:='LiSu'
          else if SameText(lfname,'微软雅黑') then
            lfname:='Microsoft YaHei UI';
          familyItem := FontCollection.Family[lfname];
          if familyItem=nil then
          begin
            //中文字体乱码 fastreport4格式
            lfname:=UTF8ToCP936(Font.Name);
            if SameText(lfname,'宋体') then
              lfname:='SimSun'
            else if SameText(lfname,'黑体') then
              lfname:='SimHei'
            else if SameText(lfname,'楷体') then
              lfname:='KaiTi'
            else if SameText(lfname,'仿宋_GB2312') then
              lfname:='FangSong_GB2312'
            else if SameText(lfname,'楷体_GB2312') then
              lfname:='KaiTi_GB2312'
            else if SameText(lfname,'幼圆') then
              lfname:='YouYuan'
            else if SameText(lfname,'新宋体') then
              lfname:='NSimSun'
            else if SameText(lfname,'隶书') then
              lfname:='LiSu'
            else if SameText(lfname,'微软雅黑') then
              lfname:='Microsoft YaHei UI';
            familyItem := FontCollection.Family[lfname];
            if familyItem = nil then
            begin
                familyItem := FontCollection.Family[SwapFontName];
                if familyItem = nil then
                  raise Exception.CreateFmt('Cant swap font 1.%s 2.%s 3.%s',[Font.Name,lfname,SwapFontName]);
            end;
          end;
        end;
        Result := familyItem.FamilyName;
        {$else}
        familyItem := FontCollection.Family[Font.Name];
        if familyItem = nil then
        begin
          familyItem := FontCollection.Family[SwapFontName];
          if familyItem = nil then
            raise Exception.Create('Cant swap font');
        end;
        Result := familyItem.FamilyName;
        {$endif}  
    

酒肉穿肠过 佛祖心中留 世人若学我 如同入魔道

posted @ 2025-09-04 16:05  后凤凰  阅读(38)  评论()    收藏  举报