Skip to content

Commit

Permalink
Corrigindo tamanho do número e instrumentos selecionados em modo
Browse files Browse the repository at this point in the history
carnaval
  • Loading branch information
gabrielmcf committed Feb 3, 2025
1 parent d0a1c1c commit 041028e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
19 changes: 8 additions & 11 deletions src/createSongBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,33 +227,30 @@ const addSongPage = async (
const promises: Promise<void>[] = [];

if (backSheetPageNumber) {
const fontSize = 7 * cm2pt;
const fontSize = 9 * cm2pt;
const titleSpacing = 6 * cm2pt;
const numberSpacing = 0;

doc.addPage();
currentPage++;

await drawImage(doc, `assets/patrocinio-2025.png`, currentPage);
// doc
// .moveTo(5.5 * cm2pt, 1 * cm2pt)
// .lineTo(5.5 * cm2pt, 12 * cm2pt)
// .stroke();
// await drawImage(doc, `assets/patrocinio-2025.png`, currentPage);

doc
.font("Roboto-Bold")
.fontSize(fontSize)
.text(songPageIndex, 4 * cm2pt, 1.5 * cm2pt + numberSpacing, {
.text(songPageIndex, 1 * cm2pt, 0.5 * cm2pt + numberSpacing, {
align: "center",
width: 15 * cm2pt,
width: 16 * cm2pt,
height: fontSize,
}); // Número do verso
doc
.font("Roboto-Medium")
.fontSize(1 * cm2pt)
.text(song.title.toUpperCase(), 8 * cm2pt, 3 * cm2pt + titleSpacing, {
.text(song.title.toUpperCase(), 1 * cm2pt, 4 * cm2pt + titleSpacing, {
align: "center",
width: 8 * cm2pt,
height: 3 * cm2pt,
width: 16 * cm2pt,
height: 9 * cm2pt,
}); // Título do verso
}

Expand Down
2 changes: 1 addition & 1 deletion src/tsx/PdfGenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const PDFGenerator = ({ songBook }: PdfGeneratorProps) => {
if (instrument != "all") {
selectedInstruments = selectedInstruments.filter((i) => instrument == i);
}
if (carnivalMode){
if (carnivalMode && instrument == "all"){
selectedInstruments = carnivalInstruments
}
if (scores.length < 1) {
Expand Down

0 comments on commit 041028e

Please sign in to comment.