Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(skia): FontFamily may return null and fail TextBlock rendering #4325

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

jeromelaban
Copy link
Member

GitHub Issue (If applicable): unoplatform/calculator#319

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

On some systems, asking for fonts by family may return null, failing to render textblocks.

What is the new behavior?

The default system font is used instead.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@jeromelaban jeromelaban requested a review from a team October 20, 2020 02:04
@gitpod-io
Copy link

gitpod-io bot commented Oct 20, 2020

@nventive-devops
Copy link
Contributor

The build 20829 found UI Test snapshots differences: android-28: 30, android-28-Snap: 18, ios: 63, ios-Snap: 31, skia-gtk-screenshots: 28, wasm: 6, wasm-automated: 4

Details
  • android-28: 30 changed over 438

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ComboBoxTests_Fullscreen_Popup_Generic_Opened
    • Dismiss_MenuFlyout_AfterSuccess
    • Keyboard_Textbox_InsideScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • MenuFlyoutItem_ClickTest_AfterSuccess
    • MenuFlyoutItem_ClickTest_menuShown
    • PopupWithOverlay_After
    • Simple_MenuFlyout_AfterSuccess
    • Simple_MenuFlyout_exitMenu
    • Simple_MenuFlyout_xamlUIMenu
    • Simple_SubMenuFlyout_AfterSuccess
    • Simple_SubMenuFlyout_fileMenu
    • CommandBar_LongTitle_Validation_CommandBar_-_LongTitle_-_3_-_Orientation_Portrait
    • ComboBoxTests_Fullscreen_Popup_Generic_Closed
    • Dismiss_MenuFlyout_fileMenu
    • Keyboard_Textbox_InsideScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • android-28-Snap: 18 changed over 780

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Button_Custom_Button_With_ContentTemplate_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Custom_Button_With_ContentTemplate
    • ComboBox_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_DropDownPlacement_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_DropDownPlacement
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage
    • MediaPlayerElement_MediaPlayerElement_Stretch_Fill_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Stretch_Fill
    • MediaPlayerElement_Using__avi_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Avi_Extension
    • Progress_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ScrollViewer_UITests_Windows_UI_Xaml_Controls_ScrollViewerTests_ScrollViewer_Padding_UITests_Windows_UI_Xaml_Controls_ScrollViewerTests_ScrollViewer_Padding
    • TabView_UITests_Microsoft_UI_Xaml_Controls_TabViewTests_TabViewBasicPage_UITests_Microsoft_UI_Xaml_Controls_TabViewTests_TabViewBasicPage
    • TabView_UITests_Microsoft_UI_Xaml_Controls_TabViewTests_TabViewPage_UITests_Microsoft_UI_Xaml_Controls_TabViewTests_TabViewPage
    • TextBlockControl_TextBlockMultilineInStarStackPanel_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBlockMultilineInStarStackPanel
    • Transform_Grid_With_RotateTransform_And_Button_SamplesApp_Wasm_Windows_UI_Xaml_Media_Transform_Grid_With_RotateTransform_And_Button
    • Transform_Image_With_RotateTransform_Uno_UI_Samples_Content_UITests_Transform_Image_With_RotateTransform
    • Transform_TextBox_With_RotateTransform_SamplesApp_Wasm_Windows_UI_Xaml_Media_Transform_TextBox_With_RotateTransform
    • WebView_WebView_WithHeaders_Uno_UI_Samples_Content_UITests_WebView_WebView_WithHeaders
    • TextBlockControl_TextBoxSizeChanging_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBoxSizeChanging
    • Time_Picker_TimePicker_TimePickerFlyoutStyle_UITests_Windows_UI_Xaml_Controls_TimePicker_TimePicker_TimePickerFlyoutStyle
    • TextBox_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll
    • UIElement_TransformToVisual_Simple_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_Simple
  • ios: 63 changed over 225

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Button_Events_UITests_Shared_Windows_UI_Xaml_Controls_Button_Button_Events
    • CheckBox_DoubleTapValidation_Uno_UI_Samples_Content_UITests_ButtonTestsControl_CheckBox_IsEnabled_Automated
    • CheckBox_IsEnabled_StatePreservation_Uno_UI_Samples_Content_UITests_ButtonTestsControl_CheckBox_IsEnabled_Automated
    • DatePickerFlyout_Unloaded_UITests_Shared_Windows_UI_Xaml_Controls_DatePicker_DatePicker_SampleContent
    • DatePicker_Flyout_DatePicker_-_Flyout
    • FlyoutTest_DataBoundButton_CommandExecutes_UITests_Shared_Windows_UI_Xaml_Controls_Flyout_Flyout_ButtonInContent
    • FlyoutTest_Simple_FlyoutsCanBeDismissed_Uno_UI_Samples_Content_UITests_Flyout_Flyout_Simple
    • Flyout_TemplatedParent_UITests_Windows_UI_Xaml_Controls_Flyout_Flyout_TemplatedParent
    • Keyboard_Textbox_InsideScrollViewer_Validation_1_-_Remove_Focus_on_filledTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_Uno_UI_Samples_Content_UITests_TextBoxControl_Input_Test_NoScrollViewer_Automated
    • TextBox_PageLoadedTest_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_TextChanged
    • TwoStates_UITests_Shared_Windows_UI_Xaml_Controls_CheckBoxTests_CheckBox_Automated
    • Button_IsEnabled_Validation_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Button_IsEnabled_Automated
    • Button_OverlappedButtons_UITests_Shared_Windows_UI_Xaml_Controls_Button_Overlapped_Buttons
    • CheckBox_IsEnabled_Validation_Uno_UI_Samples_Content_UITests_ButtonTestsControl_CheckBox_IsEnabled_Automated
    • DatePickerFlyout_Date_Binding_UITests_Shared_Windows_UI_Xaml_Controls_DatePicker_DatePicker_SampleContent
    • HyperlinkButton_IsEnabled_Validation_Uno_UI_Samples_Content_UITests_ButtonTestsControl_HyperlinkButton_IsEnabled_Automated
    • Keyboard_Textbox_NoScrollViewer_Validation_1_-_Remove_Focus_on_filledTextBox
  • ios-Snap: 31 changed over 772

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ComboBox_ComboBox_Picker_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_Picker
    • ListView_ListViewGroupedVariableHeightComplexTemplate_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedVariableHeightComplexTemplate
    • ListView_ListView_BoundSelectedItem_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_BoundSelectedItem
    • GridTestsControl_Grid_with_Stack_Panel_and_Trimming_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_Stack_Panel_and_Trimming
    • GridTestsControl_Grid_with_Text_HorizontalAlignment_With_Margin_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_Text_HorizontalAlignment_With_Margin
    • GridTestsControl_Grid_with_UILabel_TextAlignmentVertical_Bottom_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_UILabel_TextAlignmentVertical_Bottom
    • ListView_ListViewGroupedChanging_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedChanging
    • ListView_ListViewHeaderImage_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewHeaderImage
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • MediaPlayerElement_Original_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Original
    • MediaPlayerElement_Using__3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension
    • MediaPlayerElement_Using__avi_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Avi_Extension
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage
    • Image_ImageUniformWithinScrollViewer_Uno_UI_Samples_UITests_ImageTestsControl_ImageUniformWithinScrollViewer
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Uno_UI_Samples_UITests_Image_Image_Stretch
    • MediaPlayerElement_MediaPlayerElement_Stretch_Fill_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Stretch_Fill
    • ListView_ListView_Expandable_Item_Large_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item_Large
    • Pointers_DragCoordinates_Automated_UITests_Shared_Windows_UI_Xaml_Input_Pointers_DragCoordinates_Automated
    • TextBlockControl_SimpleText_MaxLines_Different_Font_Size_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_SimpleText_MaxLines_Different_Font_Size
    • TextBox_TextBox_HorizontalAlignment_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_HorizontalAlignment
  • skia-gtk-screenshots: 28 changed over 768

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ColorPicker-ColorPickerSample
    • CommandBar-CommandBar_With_Long_Sentences
    • Image-Image_Transforms
    • Image-Image_Margins
    • Image-Image_Stretch
    • ListView-ListViewGrouped
    • ListView-ListViewGroupedChanging
    • Image-UniformToFill100x100
    • ListView-ListViewLegacy
    • ListView-ListViewResizable
    • ListView-ListViewResizableText
    • ListView-ListViewScrollIntoViewSnapPoints
    • ListView-ListViewStackPanel
    • ListView-ListViewGroupedLargeLegacy
    • ListView-ListView_Image
    • ListView-ListView_With_ListViews_Count_Measure
    • Routed Events-Test Page
    • NavigationView-NavigationView_BasicNavigation
    • NavigationView-NavigationView_Pane_Automated
    • NumberBox-NumberBox_ExpressionTest
  • wasm: 6 changed over 781

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRingPage
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewChangeView
    • UITests.Shared.Windows_UI_Xaml_Automation.AutomationProperties_Name
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_With_ListViews_Count_Measure
    • Uno.UI.Samples.Content.UITests.Transform.Image_With_RotateTransform
    • Uno.UI.Samples.UITests.ImageTestsControl.UniformToFill100x100
  • wasm-automated: 4 changed over 480

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Late_With_Fixed_Dimensions_UITests_Windows_UI_Xaml_Controls_ImageTests_ImageWithLateSourceFixedDimensions
    • NavigateBackAndForthBetweenMenuItemsAndSettings_SamplesApp_Samples_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_BasicNavigation
    • Screenshots_Image_Stretch_Alignment_Bigger_Mode-1
    • Screenshots_Image_Stretch_Alignment_Wider_Mode-1

@jeromelaban jeromelaban merged commit fb3fd50 into master Oct 20, 2020
@jeromelaban jeromelaban deleted the dev/jela/skia-default-fonts branch October 20, 2020 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants