Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug][iOS] Custom font not rendered when Label.TextType="Html" #10588

Closed
davidbritch opened this issue May 6, 2020 · 3 comments · Fixed by #10989
Closed

[Bug][iOS] Custom font not rendered when Label.TextType="Html" #10588

davidbritch opened this issue May 6, 2020 · 3 comments · Fixed by #10989
Labels
a/embedded fonts a/label in-progress This issue has an associated pull request that may resolve it! t/bug 🐛

Comments

@davidbritch
Copy link

Description

The following code uses a custom font, registered with the ExportFont attribute, and works perfectly:

        <Label Text="Hello Forms with XAML"
               FontFamily="Lobster" />

Simulator Screen Shot - iPhone 11 - 2020-05-06 at 10 09 21

However, when the TextType property is set to Html, the custom font isn't rendered on iOS:

        <Label Text="Hello Forms with XAML"
               FontFamily="Lobster"
               TextType="Html"/>

Simulator Screen Shot - iPhone 11 - 2020-05-06 at 10 09 07

Steps to Reproduce

  1. Run the attached sample.

Expected Behavior

"Hello Forms with XAML" is rendered using the custom font.

Actual Behavior

"Hello Forms with XAML" is rendered using the default (plain) font.

Basic Information

  • Version with issue: 4.6.0.726
  • IDE: VSMac 8.5.4
  • Platform Target Frameworks:
    • iOS: 13.4

Reproduction Link

WorkingWithFonts.zip

@davidbritch davidbritch added t/bug 🐛 s/unverified New report that has yet to be verified labels May 6, 2020
@sandlergiovanni
Copy link

Refering on #2802 bug, my assemblyinfo file is currently using an alias like this:

[assembly: ExportFont("CircularStd-Bold.ttf", Alias = "FontStdBold")]

@StephaneDelcroix StephaneDelcroix removed the s/unverified New report that has yet to be verified label May 8, 2020
@alexeystrakh
Copy link

We have faced a similar issue (probably the same) on one iOS project and pulled together a sample to reproduce the issue. Basically the issue is reproduced even without using a custom font, even basic attributes are not applied (e.g. FontSize, TextColor) when TextType=Html. And it works for Android as expected, please see below:

Simulator Screen Shot - iPhone 11 - 2020-06-05 at 10 22 42

Screenshot_1591404632

The sample project is below:
https://github.com/pchandravadan/AASample

@hartez hartez added the in-progress This issue has an associated pull request that may resolve it! label Jun 9, 2020
@nonubitta
Copy link

nonubitta commented Jun 13, 2020

Waiting for this one to be fixed. Very important for my project. :(

rmarinho pushed a commit that referenced this issue Jun 22, 2020
…0989) fixes #10588

* Ensure that TextColor, and Font apply to HTML Labels on iOS
Fixes #10588

* More tests; handle situations where Forms properties are not set;
bmacombe pushed a commit to bmacombe/Xamarin.Forms that referenced this issue Jul 7, 2020
…marin#10989) fixes xamarin#10588

* Ensure that TextColor, and Font apply to HTML Labels on iOS
Fixes xamarin#10588

* More tests; handle situations where Forms properties are not set;
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/embedded fonts a/label in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants