Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

整理高频字进 baseSplit.woff #23

Open
itorr opened this issue Jul 16, 2022 · 2 comments
Open

整理高频字进 baseSplit.woff #23

itorr opened this issue Jul 16, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@itorr
Copy link
Owner

itorr commented Jul 16, 2022

再遇到 20w/天的访问量目前的后端肯定会崩,需要整理高频字进 baseSplit 把压力交给 CDN

@itorr itorr added the enhancement New feature or request label Jul 16, 2022
@itorr itorr changed the title 整理高频字进 baseSplit.woff 里 整理高频字进 baseSplit.woff Jul 16, 2022
@albaz64
Copy link

albaz64 commented Apr 6, 2023

再遇到 20w/天的访问量目前的后端肯定会崩,需要整理高频字进 baseSplit 把压力交给 CDN

可以讲讲怎么实现的 https://lab.magiconch.com/api/fontmin 吗? 看了一下 fontmin, 似乎没有提供这种 api 形式的 demo.

@Ice-Hazymoon
Copy link

like this

fontmin
    .src(fonts_name)
    .use(
        Fontmin.glyph({
            text: str.split(','),
            hinting: true // keep ttf hint info (fpgm, prep, cvt). default = true
        })
    )
    .run(function (err, files) {
        const buffer = files[0].contents;
        res.writeHead(200, {
            'Content-Type': 'font/ttf',
            'Content-length': buffer.length
        });
        res.end(buffer);
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants