Skip to content

Commit

Permalink
処理を軽く
Browse files Browse the repository at this point in the history
  • Loading branch information
tubone24 committed Mar 16, 2024
1 parent 1655ed2 commit e54767d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions/src/ogp.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ const transaction = Sentry.startTransaction({
name: "ogp transaction",
});

// opentype: フォントの読み込み
const font = opentype.loadSync("./functions/src/KaiseiTokumin-Bold.ttf");

exports.handler = async (event, context) => {
console.log(event);
console.log(context);
Expand Down Expand Up @@ -145,6 +142,9 @@ exports.handler = async (event, context) => {
};

function generateTextPath(text, width, lineHight, textOptions) {
// opentype: フォントの読み込み
const font = opentype.loadSync("./functions/src/KaiseiTokumin-Bold.ttf");

// テキストオプションのデフォルト値を設定
textOptions = {
align: textOptions?.align ?? `left`,
Expand Down

0 comments on commit e54767d

Please sign in to comment.