"IOS" Ios/mac system uses fonts such as Microsoft Ya-hei

Source: Internet
Author: User

The default font for iOS systems always gives the impression of blurring the hollow, while the Microsoft Black font is slightly flat and full, with a simple and stretched stroke that is easy to read. So how to use Microsoft Jas font in Mac or iOS.
The following is a brief description. launchpad-Font Book. Font TTF files are generic.
1. Get Microsoft Ya-Black font
Enter C:\WINDOWS\Fonts in the WINDOWS system, find the Microsoft Jache (True Type) font, and drag it directly out of the desktop or other folder. [Finally, it is best to copy the dragged font into the C:\WINDOWS\Fonts, because if there is no copy option in C:\WINDOWS\Fonts directly].
2. Add Mac System Font Library
After obtaining the Microsoft Msyh.ttf file, copy to Mac system, open the Mac system font Book: Open launchpad-Font Book-all fonts-add font to find the file of Ya-hei font and add or open the Msyh.ttf file directly, click Install font in the pop-up window. After the installation of my test, Microsoft Jas in the font Book of the Mac display is hei.
3. Use Microsoft Jas font in iOS project
Add Microsoft Jas font file Msyh.ttf to iOS project. Add a new key to the project-xxx.plist named "Fonts provided by Application" and Xcode will complete automatically. To determine the type of the key as an array of arrays, we need to add different fonts as elements of that key. Here we need to add a font file name, in this case the MSYH.TTF, including the file suffix name. When using this font, you can use code similar to the following:
Self.mylabel.font = [Uifont fontwithname:@ "Msyh" size:14];
When using the above code, you only need to enter the name of the font file without entering the suffix name.

"IOS" Ios/mac system uses fonts such as Microsoft Ya-hei

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.