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

推荐订阅源

WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Visual Studio Blog
宝玉的分享
宝玉的分享
IT之家
IT之家
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
I
InfoQ
B
Blog RSS Feed
T
Threatpost
博客园_首页
M
MIT News - Artificial intelligence
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Know Your Adversary
Know Your Adversary
U
Unit 42
Engineering at Meta
Engineering at Meta
C
Cyber Attacks, Cyber Crime and Cyber Security
月光博客
月光博客
Scott Helme
Scott Helme
T
Tor Project blog
有赞技术团队
有赞技术团队
AWS News Blog
AWS News Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
S
Schneier on Security
Vercel News
Vercel News
博客园 - Franky
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
L
LangChain Blog
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
Latest news
Latest news
C
CXSECURITY Database RSS Feed - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
G
GRAHAM CLULEY
S
Security Affairs
A
About on SuperTechFans
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
大猫的无限游戏
大猫的无限游戏
W
WeLiveSecurity
Cisco Talos Blog
Cisco Talos Blog
罗磊的独立博客

博客园 - 后凤凰

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)  评论()    收藏  举报