Make all lowercase letters capital in font file

1k views Asked by At

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?

2

There are 2 answers

1
Człowiek Fin Śpiewak On BEST ANSWER

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.

0
unbindall On

I am unsure how to convert cases in HTML, CSS, or font files. There is a method in JavaScript that can convert strings though.

("string").toUpperCase(/*Enter substring value, by default it converts the whole string*/);

A similar method is used for "lowercasing": ("string").toLowerCase();

You could input the HTML content into JavaScript to convert the cases, then document.write them back out onto the page.