diff --git a/third_party/txt/src/txt/platform_mac.mm b/third_party/txt/src/txt/platform_mac.mm index 8b6bb9c33c1b1b0134102a4d2b5b7525d0e26697..9a97e06f099cc326405848b559a8c28de8d80a7a 100644 --- a/third_party/txt/src/txt/platform_mac.mm +++ b/third_party/txt/src/txt/platform_mac.mm @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include "flutter/fml/platform/darwin/platform_version.h" #include "txt/platform.h" #if TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR @@ -16,7 +17,11 @@ namespace txt { std::string GetDefaultFontFamily() { - return [FONT_CLASS systemFontOfSize:14].familyName.UTF8String; + if (fml::IsPlatformVersionAtLeast(9)) { + return [FONT_CLASS systemFontOfSize:14].familyName.UTF8String; + } else { + return "Helvetica"; + } } } // namespace txt