Skip to content

Commit

Permalink
feat(geo): print add source sans font to jspdf
Browse files Browse the repository at this point in the history
  • Loading branch information
aziz-access committed Apr 23, 2024
1 parent 232f801 commit 1fab382
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/geo/src/lib/print/shared/fonts/fonts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { openSansFonts } from './open-sans';
import { robotoFonts } from './roboto';
import { sourceSansFonts } from './source-sans';

export default function jsPdfFonts(jsPDFAPI) {
sourceSansFonts(jsPDFAPI);
robotoFonts(jsPDFAPI);
openSansFonts(jsPDFAPI);
}
17 changes: 17 additions & 0 deletions packages/geo/src/lib/print/shared/fonts/source-sans.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/geo/src/lib/print/shared/print.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export class PrintService {
mapPrintExtent: Array<number>;

TEXTPDFFONT = {
titleFont: 'Roboto',
titleFont: 'SourceSans',
titleFontStyle: 'bold',
subtitleFont: 'Roboto',
subtitleFont: 'SourceSans',
subtitleFontStyle: 'bold',
commentFont: 'OpenSans',
commentFont: 'SourceSans',
commentFontStyle: 'normal',
commentFontSize: 12
};
Expand Down Expand Up @@ -78,7 +78,7 @@ export class PrintService {
format: paperFormat.toLowerCase(),
unit: 'mm' // default
});

console.log('sss', doc.getFontList());
const dimensions = [
doc.internal.pageSize.width,
doc.internal.pageSize.height
Expand Down

0 comments on commit 1fab382

Please sign in to comment.