node-csswring icon indicating copy to clipboard operation
node-csswring copied to clipboard

rename custom font-families

Open robsonsobral opened this issue 9 years ago • 2 comments

Hi!

I just had an idea that might interest you: to obfuscate the custom font-family.

@font-face {
    font-family: 'custom-Font';
    src: url('custom-font-webfont.eot');
    src: url('custom-font-webfont.eot?#iefix') format('embedded-opentype'),
         url('custom-font-webfont.svg#custom-font') format('svg'),
         url('custom-font-webfont.woff') format('woff'),
         url('custom-font-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.foo {
    font-family: 'custom-font';
}

It can be changed to:

@font-face {
    font-family: 'a';
    src: url('custom-font-webfont.eot');
    src: url('custom-font-webfont.eot?#iefix') format('embedded-opentype'),
         url('custom-font-webfont.svg#custom-font') format('svg'),
         url('custom-font-webfont.woff') format('woff'),
         url('custom-font-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.foo {
    font-family: 'a';
}

I'm sorry, but I don't have the expertise to implement it myself.

robsonsobral avatar Dec 04 '15 18:12 robsonsobral

I had same idea some time ago. It’s good, but implementation can be too complicated for saving around 10 bytes.

I keep this issue open, but don’t expect much of me.

hail2u avatar Dec 05 '15 03:12 hail2u

Thanks for considering.

I'm not waiting for the feature. I just want to share the idea.

I'm sorry I can't implement it myself.

Thanks!

robsonsobral avatar Dec 05 '15 11:12 robsonsobral