When you're done, run ttx -flavor woff borked-font.ttx to convert it back into a woff file. winDescent is equal to the lowest ymin in the font times -1.winAscent is equal to the largest ymax value in the font.sTypoDescender is equal to hheaDescender.sTypoAscender is equal to hheaAscender (meaning the key in the table).fsSelect bit 7 (the eighth number in the sequence) is set to 1.Open the ttx file in your text editor and look for problems. This will convert the binary ttf into a human-readable XML file called borked-font.ttx. Then cd your way to your project folder and run ttx borked-font.ttf. Install fonttools and brotli with pip install fonttools brotli. If this doesn't work, you can adjust the metrics manually using the command line and a text editor. If you're lucky, this will repair the inconsistent metrics and your type will render correctly. Upload the file to the FontSquirrel Webfont Generator, switch to Expert mode, check "Auto-Adjust Vertical Metrics", and download the generated fonts. Failing that, you can generate new font files yourself in one of two ways: 1. This is especially true for commercial typefaces, which you're usually not allowed to modify. The best option is to get whoever produced the font to re-export it with the correct metrics. My first thought was that something was wrong with my CSS – maybe there's a rogue line-height declaration that gets applied in one place and not the other? But it turned out the problem was actually the font itself: It had different vertical metrics for each platform. But when I pull up the same page on a Mac (regardless of the browser) the line height is totally different. Upload the file along with your fonts and your settings will be restored.Here's a really specific problem I've run into a handful of times building websites with custom fonts: I set some type on my Windows machine, and everything works as expected. If you do a lot of processing with the Generator, you can use it to speed up your workflow. Some individual fonts are known to crash the Generator so we blacklist these as well.We do not allow you to reprocess exisiting webfonts.
0 Comments
Leave a Reply. |