Search code examples
htmlcssfontstruetype

Make all lowercase letters capital in font file


I have a .ttf font file I created. I got all the capital characters, but not the lowercase. Is there a tool or easy way I could make all the lowercase letters the same as capital?
Example: The font should display "hello" as "HELLO"

If that is not possible is there a way I can do this with HTML/CSS?


Solution

  • Sure, you can add CSS rule:

    body {
        text-transform: uppercase;
    }
    

    @DominatorX According to your answer, you can try something like this:

    var allDomElems = $('body *'),
        helper;
    
    allDomElems.each(function () {
        helper = $(this).text();
        helper = helper.toUpperCase();
        if($(this).children().length === 0) {
            $(this).text(helper);
        }
    });
    

    This doesn't work in all cases, so you'll have to debug the script.