Chat Calendar Message Styling

Hello,

Please add SfChatCalendarFontFamily element to set values to the in built keys of a calendar message in resource dictionary.

If I don't add the SF UI font to the app resource, the following warning keeps popping up.

"CoreText note: Client requested name ".SFUIDisplay-Medium", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such"

Thank you,
Ilnam

14 Replies

KK Karthikraja Kalaimani Syncfusion Team May 5, 2020 01:21 PM UTC

 
Hi IInam,

Currently we are validating your requirement. We will validate and update you further details on or before 7th May 2020. We appreciate your patience until then.

Regards,
Karthik Raja
 



KK Karthikraja Kalaimani Syncfusion Team May 7, 2020 10:06 AM UTC

Hi IInam,

Thank you for your patience.

Your requirement can be achieved by setting the fontfamily for SfCalendar messages in Resources of SfChat. For more details please refer to the below Sample and code snippet.

Code snippet :

 
<ContentPage.Resources> 
        <ResourceDictionary> 
            <OnPlatform x:TypeArguments="x:String" x:Key="SfUIFont"> 
                <On Platform="Android" Value="SF-UI-Display-Medium.otf" /> 
                <On Platform="UWP" Value="/Assets/SF-UI-Display-Medium.otf#SF-UI" /> 
                <On Platform="iOS" Value="SF-UI-Display-Medium" /> 
            </OnPlatform> 
        </ResourceDictionary> 
    </ContentPage.Resources> 
     
    <ContentPage.BindingContext> 
        <local:GettingStartedViewModel x:Name="viewModel"/> 
    </ContentPage.BindingContext> 
 
     
    <ContentPage.Content> 
 
        <sfChat:SfChat x:Name="sfchat" 
                       Messages="{Binding Messages}" 
                       SendMessageCommand="{Binding SendMessage}" 
                       CurrentUser="{Binding CurrentUser}" > 
            <sfChat:SfChat.Resources> 
                <ResourceDictionary> 
                    <Style TargetType="sfcalendar:MonthViewSettings"> 
                        <Setter Property="HeaderFontFamily" Value="{StaticResource SfUIFont}"/> 
                        <Setter Property="DayCellFontFamily" Value="{StaticResource SfUIFont}"/> 
                        <Setter Property="DayHeaderFontFamily" Value="{StaticResource SfUIFont}"/> 
                    </Style> 
                </ResourceDictionary> 
            </sfChat:SfChat.Resources> 
        </sfChat:SfChat> 
    </ContentPage.Content> 
 
 



SA Sam December 28, 2020 03:49 PM UTC

The uploaded solution still seems to trigger the warning. In addition, it also causes an ArgumentNullException

I am having the same problem as the OP using just the SfCalendar.

My Console output from the code is as follows:

Launched application 'com.companyname.GettingStarted' on 'Sam' with pid 5627
2020-12-28 15:40:35.260 GettingStarted.iOS[5627:910217] CoreText note: Client requested name ".SFUIDisplay-Medium", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].
2020-12-28 15:40:35.260 GettingStarted.iOS[5627:910217] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2020-12-28 15:40:35.261 GettingStarted.iOS[5627:910217] CoreText note: Client requested name ".SFUIDisplay-Medium", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].
2020-12-28 15:40:35.261 GettingStarted.iOS[5627:910217] CoreText note: Client requested name ".SFUIDisplay-Medium", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].
2020-12-28 15:40:35.781 GettingStarted.iOS[5627:910217] 
Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: value
  at UIKit.UILabel.set_Font (UIKit.UIFont value) [0x00058] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.6.0.15/src/Xamarin.iOS/UIKit/UILabel.g.cs:380 
  at Syncfusion.SfCalendar.iOS.MonthDayHeader.UpdateDayLableStyle (UIKit.UILabel dayOfWeekLabel) [0x00011] in <98ad3c75c9b045629bef0566bbcfa59e>:0 
  at Syncfusion.SfCalendar.iOS.MonthDayHeader.UpdateDayLabelText () [0x001b1] in <98ad3c75c9b045629bef0566bbcfa59e>:0 
  at Syncfusion.SfCalendar.iOS.MonthDayHeader.LayoutSubviews () [0x0000d] in <98ad3c75c9b045629bef0566bbcfa59e>:0 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.6.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.6.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at GettingStarted.iOS.Application.Main (System.String[] args) [0x00001] in /Users/Sam/Downloads/Chat Getting started (1)/GettingStarted.iOS/Main.cs:17 
2020-12-28 15:40:35.782 GettingStarted.iOS[5627:910217] Unhandled managed exception: Value cannot be null.
Parameter name: value (System.ArgumentNullException)
  at UIKit.UILabel.set_Font (UIKit.UIFont value) [0x00058] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.6.0.15/src/Xamarin.iOS/UIKit/UILabel.g.cs:380 
  at Syncfusion.SfCalendar.iOS.MonthDayHeader.UpdateDayLableStyle (UIKit.UILabel dayOfWeekLabel) [0x00011] in <98ad3c75c9b045629bef0566bbcfa59e>:0 
  at Syncfusion.SfCalendar.iOS.MonthDayHeader.UpdateDayLabelText () [0x001b1] in <98ad3c75c9b045629bef0566bbcfa59e>:0 
  at Syncfusion.SfCalendar.iOS.MonthDayHeader.LayoutSubviews () [0x0000d] in <98ad3c75c9b045629bef0566bbcfa59e>:0 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.6.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:86 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.6.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:65 
  at GettingStarted.iOS.Application.Main (System.String[] args) [0x00001] in /Users/Sam/Downloads/Chat Getting started (1)/GettingStarted.iOS/Main.cs:17 


KK Karthikraja Kalaimani Syncfusion Team December 29, 2020 09:51 AM UTC

Hi Sam,

Thanks for the update.

We could able to reproduce the reported issue. Currently, we are validating the reported issue. So, we will validate and update the details on or before 31st December 2020. We appreciate your patience until then.

Regards,
Karthik Raja 



KK Karthikraja Kalaimani Syncfusion Team January 2, 2021 08:21 AM UTC

 
Hi Sam,

We need some more time to look on this. We will update the details on or before 6th Jan 2021. We appreciate your patience until then.

Regards,
Karthik Raja



KK Karthikraja Kalaimani Syncfusion Team January 6, 2021 04:48 PM UTC

HI Sam, 
 
Thank you for your patience 
 
Currently, we are checking in both SfChat and Calendar control to find root cause for the issue. We will validate both the source and update validation on January 8, 2021. We appreciate your patience until then. 
  
Regards,
Karthik Raja
 



PK Pradeep Kumar Balakrishnan Syncfusion Team January 11, 2021 03:03 AM UTC

Hi Sam, 
 
Sorry for the delay caused. 
 
We are still checking on your requirement in sample level. We will update you the details by end of the day (11th January 2021). We appreciate your patience until then. 
 
Regards, 
Pradeep Kumar B  



SA Sam January 11, 2021 10:02 AM UTC

Thank you - if it helps, my environment is as follows:

- Xamarin Forms 5 (although the problem occurred under previous v4.x versions too
- JetBrains Rider IDE 2020.3
- macOS 10.15.7


PK Pradeep Kumar Balakrishnan Syncfusion Team January 11, 2021 06:33 PM UTC

Hi Sam, 
 
Thank you for the update. 
 
We have validated the faced issue “ArgumentNullException is raised when running the provided sample in form.ios platform” Adding ttf file name in info.Plist resolves this issue.  
 
Code Snippet: 
 
<key>UIAppFonts</key> 
       <array> 
              <string>SF-UI-Display-Medium.otf</string> 
       </array> 
 
But the following line is still written in output window with the above changes.  
 
“Client requested name ".SFUIDisplay-Medium", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].”   
 
In our Sfcalendar source we have used UIFont.FromName method to define UI font value. Which is the root cause for this issue. we will update to SfCalendar team. They will update the timeline for the fix on or before January 13, 2021. We appreciate your patience until then. 
 
Regards, 
Pradeep Kumar B


MS Muniappan Subramanian Syncfusion Team January 12, 2021 12:34 PM UTC

Hi Sam, 
 
We have checked, and we can replicate the reported issue “When using custom font family in calendar the error message occurred in the output window”. We have logged issue report for the same, we will fix this issue and include the issue fix our Weekly NuGet release update which is expected to be available by February 2, 2021. We appreciate your patience until then.  
 
You can track the status of this report through the following feedback link,  
 
Note: The provided feedback link is private, you need to login to view this feedback.  
 
 Regards, 
Muniappan S. 



MS Muniappan Subramanian Syncfusion Team February 2, 2021 05:54 AM UTC

Hi Sam,  
 
Sorry for the inconvenience caused. 
 
We deeply regret to let you know that we have fixed the reported issue, but it takes more time for testing is longer than we expected. Also due to the stability of the control, we are not including this in our Weekly nuget release.  But assuredly, we will include it in our upcoming weekly nuget February 09, 2021. We will let you once nuget gets published and appreciate your patience until then.  
 
Regards, 
Muniappan S 



SS SaiGanesh Sakthivel Syncfusion Team February 9, 2021 01:59 PM UTC

Hi Sam, 
 
Thank you for your patience. 
 
We have checked the mentioned issue “When using custom font family in calendar the error message occurred in the output window” and fixed the issue. We have prepared patch including the fix. Before installing the patch, kindly remove bin and obj folders from all the projects of solution and clear NuGet cache. 
 
Please refer our following KB document to clear nuget cache. 
    
 
 
 
Installation Direction:       
{Syncfusion Installed location}\Essential Studio\18.4.0.39\Xamarin\lib\netstandard\Syncfusion.SfCalendar.XForms.dll             
{Syncfusion Installed location}\Essential Studio\18.4.0.39\Xamarin\lib\android\Syncfusion. SfCalendar.XForms.Android.dll             
{Syncfusion Installed location}\Essential Studio\18.4.0.39\Xamarin\lib\ios\Syncfusion. SfCalendar.XForms.iOS.dll             
{Syncfusion Installed location}\Essential Studio\18.4.0.39\Xamarin\lib\uwp\Syncfusion. SfCalendar.XForms.UWP.dll 
 
Disclaimer:     
Please note that we have created this patch for version 18.4.0.39 specifically to include the issue. 
We will include the issue fix in our upcoming Weekly NuGet release which is expected to rolled out on February 23,2021. We appreciate your patience until then.   
 
Regards,    
SaiGanesh Sakthivel 



SS SaiGanesh Sakthivel Syncfusion Team February 23, 2021 04:28 PM UTC

Hi Sam,   
 
Sorry for the inconvenience caused 
 
#Regarding custom font family in calendar the error message occurred in the output window 
We deeply regret to let you know that we have fixed the reported issue but it takes more time for testing is longer than we expected. Also due to the stability of the control, we are not including this in our weekly nuget release. But assuredly, we will include it in our upcoming 2021 Volume 1 release which is excepted to roll out in the month of March. We will let you once nuget gets published and appreciate your patience until then. 
 
Regards, 
SaiGanesh Sakthivel 



MS Muniappan Subramanian Syncfusion Team March 31, 2021 08:39 AM UTC

Hi Sam,  
 
We are glad to announce that our Essential Studio 2021 Volume 1 Release v19.1.0.54 is rolled out and is available for download under the following link. 
 
 
The mentioned issue with “[iOS] When setting Font Family in the calendar the error message shown in the output window” issue has been fixed and included in this release. 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Muniappan S 


Loader.
Up arrow icon