mORMot and Open Source friends
Check-in [a4eaf1c539]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:{6382} allow to embed symbol font subset to the pdf
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a4eaf1c53917e6cad53bcb02a9af9bee8fd5eb84
User & Date: ab 2022-04-27 10:28:57
Context
2022-04-28
15:56
{6383} identify font subset in PDF content check-in: 8d158c3f61 user: ab tags: trunk
2022-04-27
10:28
{6382} allow to embed symbol font subset to the pdf check-in: a4eaf1c539 user: ab tags: trunk
2022-04-26
12:46
{6381} fixed regression after UpperCopy255Buf() last modification check-in: f64cd122ef user: ab tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SynPdf.pas.

6120
6121
6122
6123
6124
6125
6126

6127
6128
6129
6130
6131
6132
6133
....
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
end;

const
  TTFCFP_MAC_PLATFORMID = 1;
  TTFCFP_MS_PLATFORMID = 3;
  TTFCFP_SYMBOL_CHAR_SET = 0;
  TTFCFP_UNICODE_CHAR_SET = 1;


  TTFCFP_FLAGS_SUBSET = 1;
  TTFMFP_SUBSET = 0;
  TTFCFP_FLAGS_TTC = 4;
  TTCF_TABLE = $66637474;

type
................................................................................
                    Used.Add(WinAnsiConvert.AnsiToWide[i]);
                with fUsedWideChar do
                  for i := 0 to Count-1 do
                    Used.Add(Values[i]);
                if CreateFontPackage(pointer(ttf),ttfSize,
                    SubSetData,SubSetMem,SubSetSize,
                    usFlags,ttcIndex,TTFMFP_SUBSET,0,
                    TTFCFP_MS_PLATFORMID,TTFCFP_UNICODE_CHAR_SET,
                    pointer(Used.Values),Used.Count,
                    @lpfnAllocate,@lpfnReAllocate,@lpfnFree,nil)=0 then begin
                  // subset was created successfully -> save to PDF file
                  SetString(ttf,SubSetData,SubSetSize);
                  FreeMem(SubSetData);
                end;
              end;






>







 







|







6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
....
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
end;

const
  TTFCFP_MAC_PLATFORMID = 1;
  TTFCFP_MS_PLATFORMID = 3;
  TTFCFP_SYMBOL_CHAR_SET = 0;
  TTFCFP_UNICODE_CHAR_SET = 1;
  TTFCFP_DONT_CARE = 65535;

  TTFCFP_FLAGS_SUBSET = 1;
  TTFMFP_SUBSET = 0;
  TTFCFP_FLAGS_TTC = 4;
  TTCF_TABLE = $66637474;

type
................................................................................
                    Used.Add(WinAnsiConvert.AnsiToWide[i]);
                with fUsedWideChar do
                  for i := 0 to Count-1 do
                    Used.Add(Values[i]);
                if CreateFontPackage(pointer(ttf),ttfSize,
                    SubSetData,SubSetMem,SubSetSize,
                    usFlags,ttcIndex,TTFMFP_SUBSET,0,
                    TTFCFP_MS_PLATFORMID,TTFCFP_DONT_CARE,
                    pointer(Used.Values),Used.Count,
                    @lpfnAllocate,@lpfnReAllocate,@lpfnFree,nil)=0 then begin
                  // subset was created successfully -> save to PDF file
                  SetString(ttf,SubSetData,SubSetSize);
                  FreeMem(SubSetData);
                end;
              end;

Changes to SynopseCommit.inc.

1
'1.18.6381'
|
1
'1.18.6382'