true-type-fonts

Python3 how to install .ttf font file?

倖福魔咒の 提交于 2020-01-13 19:36:54
问题 I wanted to install .ttf font file on windows 10 with python3 (more precise Python 3.6) code, I googled but the only thing I found was this one Install TTF fonts on windows with python, I tested it but it didn't do anything. Is there a way to install .ttf with python3 code? Thanks in advance. 回答1: This library seems promising (I haven't tried myself). Installing pip install --user fonttools or pip3 install --user fonttools Code from fontTools.ttLib import TTFont font = TTFont('/path/to/font

In Win7 some fonts don't work like they did in Win2K/XP

眉间皱痕 提交于 2020-01-12 18:52:13
问题 My question is about how font handling needs to be changed in order to work correctly under Windows 7. I'm sure that I've made an assumption about something that was valid before, but is no longer valid. But I don't even know where to begin looking! I'm praying someone can help! Here are the details as I understand them (I've also posted this question on a Microsoft Windows Developers forum, but they're not answering): Yes, I'm behind the times (heck, I still write WIN32 code in plain C!) I

Safari and IE can't read TTF and EOT fonts

一曲冷凌霜 提交于 2020-01-09 11:11:09
问题 I have trouble reading a font in Safari. I converted OTF to TTF - two bold and regular fonts. Both are fine in Chrome and Firefox. But in Safari, only the bold font is works, regular does not. IE does not read the EOT font which I have converted from a website. Is there any better way to convert OTF to EOT? Here is my code: <style type="text/css"> //Bariol_Bold @font-face{ font-family: Bariol_Bold; src:url("fonts/bariol_bold.eot"); /*For ie browser*/ } @font-face{ font-family: Bariol_Bold;

Why some fonts (e.g. Code 128) work locally but not in server when generating pdf file with PDFsharp

流过昼夜 提交于 2020-01-07 06:05:20
问题 I'm creating some labels with PDFsharp (using ASP.Net+VB) and everything works OK in my development PC: the PDF file shows correctly the sizes and fonts I choose (Code 128, for barcodes, and Arial. Booth are ttf). When publishing the code to the server the generated PDF shows Microsoft Sans MS instead of Code 128 . The pdf is being generated in the server and downloaded to the client (My PC), and I can't see the bar codes in generated PDF neither in server nor in client. I'm sure the font is

Libgdx Skin not Updating when Changing Font Programmatically

无人久伴 提交于 2020-01-07 04:30:40
问题 First, I loaded the skin as a json file. In the file, I put two BitmapFont defintions ("font" and "big-font") and left them practically blank (I did load a dummy ".fnt" file to prevent the parser from complaining). I then generated two FreeType Fonts using the following code: //start font generator FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/button-font.ttf")); FreeTypeFontGenerator.FreeTypeFontParameter parameters = new FreeTypeFontGenerator

Unicode fonts for Japanese

泄露秘密 提交于 2019-12-31 23:11:06
问题 I am creating a game. I have some UI with text. Recently we wanted to add Japanese language version but I have problem with fonts. I use stb_freetype to rasterize fonts and I support Unicode so it should not be a problem. But most fonts doesn't seem to contain Janapese characters, on Windows I've found that Arial Unicode does. But its size is 26 MB, that's much more than our complete game! I've seen Unicode and fonts but it doesn't cover my questions completly. So basically I'm asking about 2

Installing TTF fonts on windows with python

徘徊边缘 提交于 2019-12-30 21:57:19
问题 I want to install new fonts on windows with Python 2.7. First I copied myFont.ttf to windows Fonts folder then I Added My Font (True Type) key to registry ( HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts ). Now I want to declare system that a new font has been installed. For this I found that I should use win32api.SendMessage , But I don't know how to provide required arguments for this method? Is there anyway to install ttf fonts on windows with python? I googled it but I couldn't

Loading some TrueType Font from TTF file in Java causes FontFormatException: Font name not found

时间秒杀一切 提交于 2019-12-30 10:20:07
问题 I am attempting to create a java.awt.Font instance from a TTF file on my system, but only some fonts are able to load without error. The code below is some test code I found online. When run on my system, it is able to load 285 fonts successfully (ex. Arial.ttf), but fails on 83 fonts, (ex. AmericanTypewriter.ttf). All errors are of the form FontFormatException: Font name not found with no embedded cause. Are there known issues with java.awt.Font and format compatibility? I can't find

How to Create Subset Fonts in .NET?

岁酱吖の 提交于 2019-12-30 06:26:48
问题 I have a Silverlight application that I need to embed some less-than-common fonts in. It's simple enough for me to just copy over the TTF/OTF and compile that with my app. However, in many cases, only like 5-10 of the characters are actually used. In other cases, some font files are incredibly large ( Arial Unicode MS Regular is 22.1 MB, as an example). Fast download times of my app is really important, so optimizing the fonts used is paramount. So, what I was thinking is that I've seen in

Convert Arabic TTF/OTF fonts to woff, eof?

偶尔善良 提交于 2019-12-30 03:16:25
问题 First I know there are similar questions to mine, and I do tried Font Squirrel Generator for tons of Arabic fonts, all of them render text in English correctly but none of them worked with Arabic letters!! so is there a desktop tool (since all web apps is not working) than can convert Arabic fonts without breaking them ?? I have purchased an Arabic font, and I just want to convert it so I can use it on the web, and I did not like the idea to pay subscriptions to some fancy websites like fonts