This article describes how Xamarin.Forms lets you specify font attributes (including weight and size) on controls that display text. Font information can be specified in code or specified in XAML. It's' also possible to use a custom font, and display font icons.
Download Awesome Java font for PC/Mac for free, take a test-drive and see the entire character set. Moreover, you can embed it to your website with @font-face support. View the font in Font Book to see a sample of the characters onscreen, or print a sample. How to view and print fonts To browse the Font Book User Guide, click Table of Contents at the top of the page. The use of these trademarks does not indicate endorsement of the trademark holder by Font Awesome, nor vice versa. Brand icons should only be used to represent the company or product to which they refer. Please do not use brand logos for any purpose except to represent that particular brand or service.
Set the font in code
The 'helveticaNeue' font itself presents browser-rendering situations 'mac - pc - unix', but there are good forges, google-fonts gives a good web-font stack. Hp printer on mac. There are some for you, better looking than plain Arial. – Milche Patern Jul 16 '13 at 12:44. On my Mac, I had 15 minor problems out of 452 fonts, and the issue appeared to be duplication, which can sometimes cause the question-mark problem in question.
Use the three font-related properties of any controls that display text:
- FontFamily – the
string
font name. - FontSize – the font size as a
double
. - FontAttributes – a string specifying style information like Italic and Bold (using the
FontAttributes
enumeration in C#).
This code shows how to create a label and specify the font size and weight to display:
Font size
The FontSize
property can be set to a double value, for instance:
The size value is measured in device-independent units. For more information, see Units of Measurement.
Xamarin.Forms also defines fields in the NamedSize
enumeration that represent specific font sizes. For more information about named font sizes, see Named font sizes.
Font attributes
Font styles such as bold and italic can be set on the FontAttributes
property. The following values are currently supported:
- None
- Bold
- Italic
The FontAttribute
enumeration can be used as follows (you can specify a single attribute or OR
them together):
Set font info per platform
Alternatively, the Device.RuntimePlatform
property can be used to set different font names on each platform, as demonstrated in this code:
A good source of font information for iOS is iosfonts.com.
Set the font in XAML
Xamarin.Forms controls that display text all have a FontSize
property that can be set in XAML. The simplest way to set the font in XAML is to use the named size enumeration values, as shown in this example:
There is a built-in converter for the FontSize
property that allows all font settings to be expressed as a string value in XAML. In addition, the FontAttributes
property can be used to specify font attributes:
The Device.RuntimePlatform
property can also be used in XAML to render a different font on each platform. The example below uses different fonts on each platform:
As the M4 has built-in garbage collection, TRIM is not necessary for the drive to maintain performance. This brings you to the Boot Manager screen, where you will leave the system for a period of 6-8 hours (typically overnight is the recommended time). This procedure gives the drive idle power, which allows the controller to activate the Active Garbage Collection. The Garbage Collection will clean up any invalid data being stored on the drive. In order to activate the built-in clean up, all you need to do is restart the computer while holding down the 'Options' key. Trim ssd for mac.
Named font sizes
Xamarin.Forms defines fields in the NamedSize
enumeration that represent specific font sizes. The following table shows the NamedSize
members, and their default sizes on iOS, Android, and the Universal Windows Platform (UWP):
Member | iOS | Android | UWP |
---|---|---|---|
Default | 16 | 14 | 14 |
Micro | 11 | 10 | 15.667 |
Small | 13 | 14 | 18.667 |
Medium | 16 | 17 | 22.667 |
Large | 20 | 22 | 32 |
Body | 17 | 16 | 14 |
Header | 17 | 96 | 46 |
Title | 28 | 24 | 24 |
Subtitle | 22 | 16 | 20 |
Caption | 12 | 12 | 12 |
The size values are measured in device-independent units. For more information, see Units of Measurement.
Named font sizes can be set through both XAML and code. In addition, the Device.GetNamedSize
method can be called to return a double
that represents the named font size:
Note
On iOS and Android, named font sizes will autoscale based on operating system accessibility options. This behavior can be disabled on iOS with a platform-specific. For more information, see Accessibility Scaling for Named Font Sizes on iOS.
Use a custom font
Custom fonts can be added to your Xamarin.Forms shared project and consumed by platform projects without any additional work. The process for accomplishing this is as follows:
- Add the font to your Xamarin.Forms shared project as an embedded resource (Build Action: EmbeddedResource).
- Register the font file with the assembly, in a file such as AssemblyInfo.cs, using the
ExportFont
attribute. An optional alias can also be specified.
Important
Embedded fonts requires the use of Xamarin.Forms 4.5.0.530 or higher.
The following example shows the Lobster-Regular font being registered with the assembly, along with an alias:
Note
The font can reside in any folder in the shared project, without having to specify the folder name when registering the font with the assembly.
The font can then be consumed on each platform by referencing its name, without the file extension:
Alternatively, it can be consumed on each platform by referencing its alias:
The equivalent C# code is:
The following screenshots show the custom font:
Important
On Windows, the font file name and font name may be different. To discover the font name on Windows, right-click the .ttf file and select Preview. The font name can then be determined from the preview window.
Display font icons
Font icons can be displayed by Xamarin.Forms applications by specifying the font icon data in a FontImageSource
object. This class, which derives from the ImageSource
class, has the following properties:
Glyph
– the unicode character value of the font icon, specified as astring
.Size
– adouble
value that indicates the size, in device-independent units, of the rendered font icon. The default value is 30. In addition, this property can be set to a named font size.FontFamily
– astring
representing the font family to which the font icon belongs.Color
– an optionalColor
value to be used when displaying the font icon.
This data is used to create a PNG, which can be displayed by any view that can display an ImageSource
. This approach permits font icons, such as emojis, to be displayed by multiple views, as opposed to limiting font icon display to a single text presenting view, such as a Label
.
Important
Font icons can only currently be specified by their unicode character representation.
The following XAML example has a single font icon being displayed by an Image
view:
This code displays an XBox icon, from the Ionicons font family, in an Image
view. Note that while the unicode character for this icon is uf30c
, it has to be escaped in XAML and so becomes 
. The equivalent C# code is:
Drivers for hp deskjet 3630 series. The following screenshots, from the Bindable Layouts sample, show several font icons being displayed by a bindable layout:
Related links
Fonts by License
Free for personal use
Shareware
Public domain
Donationware
Demo
Awesome Font For Mac Download
New Fonts
Font Awesome Icons For Machine
- Best Basic fonts (1,489)
- Fixed width (50)
- Sans serif (812)
- Serif (303)
- Various (319)
- Best Bitmap fonts (731)
- Bitmap (731)
- Best Dingbats fonts (2,001)
- Alien (47)
- Ancient (77)
- Animals (144)
- Army (33)
- Asian (64)
- Bar Code (29)
- Esoteric (53)
- Fantastic (37)
- Games (51)
- Heads (101)
- Horror (26)
- Kids (125)
- Logos (65)
- Music (40)
- Nature (59)
- Runes, Elvish (112)
- Shapes (200)
- Sport (43)
- TV, Movie (96)
- Various (569)
- Best Fancy fonts (9,841)
- Cartoon (1,281)
- Comic (411)
- Curly (307)
- Decorative (1,299)
- Destroy (590)
- Distorted (507)
- Eroded (980)
- Fire, Ice (70)
- Grid (30)
- Groovy (327)
- Horror (351)
- Initials (73)
- Old School (82)
- Retro (631)
- Stencil, Army (184)
- Typewriter (163)
- Various (2,388)
- Western (167)
- Best Foreign look fonts (369)
- Arabic (29)
- Chinese, Japan (114)
- Mexican (27)
- Roman, Greek (63)
- Russian (69)
- Various (67)
- Best Gothic fonts (1001)
- Celtic (116)
- Initials (50)
- Medieval (260)
- Modern (401)
- Various (284)
- Best Holiday fonts (451)
- Christmas (126)
- Easter (25)
- Halloween (75)
- Valentine (207)
- Various (18)
- Best Script fonts (5,166)
- Brush (235)
- Calligraphy (271)
- Graffiti (269)
- Handwritten (2,685)
- School (59)
- Trash (511)
- Various (1,136)
- Best Techno fonts (2,950)
- LCD (318)
- Sci-fi (667)
- Square (491)
- Various (1,474)