Way to reduce size of .ttf fonts?
FontSquirrel’s Webfont generator makes it very easy to reduce a font’s filesize. Upload your font Choose Expert… Choose which glyphs to include Press Download Your Kit I was able to take a 263kb font down to 34kb.
FontSquirrel’s Webfont generator makes it very easy to reduce a font’s filesize. Upload your font Choose Expert… Choose which glyphs to include Press Download Your Kit I was able to take a 263kb font down to 34kb.
After a lot of fiddling, got it working (only tested in Webkit) using: font-family: “HelveticaNeue-CondensedBold”; font-stretch was dropped between CSS2 and 2.1, though is back in CSS3, but is only supported in IE9 (never thought I’d be able to say that about any CSS prop!) This works because I’m using the postscript name (find the … Read more
Yes, it shows all the fonts within your app, including the custom fonts you’ve added. Here’s the shorter code to list all the fonts: Objective-C for (NSString *familyName in [UIFont familyNames]){ NSLog(@”Family name: %@”, familyName); for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]) { NSLog(@”–Font name: %@”, fontName); } } Swift 2 for familyName:AnyObject in UIFont.familyNames() { … Read more
For the ChunkFive font from FontSquirrel, specifying “font-weight: normal;” stopped Firefox’s rendering from looking like ass when used in a header. Looks like Firefox was trying to apply a fake bold to a font that only has one weight, while Chrome was not.
To me worked this on xubuntu: from PIL import Image,ImageDraw,ImageFont # sample text and font unicode_text = u”Hello World!” font = ImageFont.truetype(“/usr/share/fonts/truetype/freefont/FreeMono.ttf”, 28, encoding=”unic”) # get the line size text_width, text_height = font.getsize(unicode_text) # create a blank canvas with extra space between lines canvas = Image.new(‘RGB’, (text_width + 10, text_height + 10), “orange”) # draw … Read more
In SwiftUI, at this point we can not change the navigationBarTitle font directly, but you can change navigationBar appearance like this, struct YourView: View { init() { //Use this if NavigationBarTitle is with Large Font UINavigationBar.appearance().largeTitleTextAttributes = [.font : UIFont(name: “Georgia-Bold”, size: 20)!] //Use this if NavigationBarTitle is with displayMode = .inline //UINavigationBar.appearance().titleTextAttributes = [.font … Read more
font-weight can fail to work if the font you are using does not have those weights in existence – you will often hit this when embedding custom fonts. In those cases the browser will likely round the number to the closest weight that it does have available. For example, if I embed the following font… … Read more
No: there have been many bugs over the years on various platforms which cause text not to be displayed or displayed incorrectly (see below). If your goal is to enable ligatures, there’s actually standard property font-variant-ligatures defined in CSS Fonts Level 3 which offers full control: font-variant-ligatures: common-ligatures; font-variant-ligatures: common-ligatures discretionary-ligatures historical-ligatures; See font-variant for … Read more
To set In-built Font at Run-Time: First of all, To Change Font-face, a Typeface class is used. Now, at Run-Time, to set the font-face, Use setTypeface(Typeface) from the Java code at Design-Time, to set the font-face, Use android:typeface=”serif” For example: <TextView android:text=”@+id/TextView01″ android:id=”@+id/TextView01″ android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:textSize=”30px” android:textStyle=”italic” android:typeface=”serif” /> To set Custom font(s) in your … Read more
You can find a list of all fonts that ship with any given Microsoft product on the MS Typography website (“Fonts by Product”): http://www.microsoft.com/typography/fonts/ WPF 4 requires at least Windows XP SP3 with IE 5.01, so the fonts you can count on are the following: – Aharoni – Andalus – AngsanaUPC – Angsana New – … Read more