diff --git a/test/IconFontTester/.editorconfig b/test/IconFontTester/.editorconfig new file mode 100644 index 0000000..b947be6 --- /dev/null +++ b/test/IconFontTester/.editorconfig @@ -0,0 +1,167 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +# This file is the top-most EditorConfig file +root = true + +########################################## +# Common Settings +########################################## + +[*] +indent_style = space +end_of_line = crlf +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 + +########################################## +# File Extension Settings +########################################## + +[*.{yml,yaml}] +indent_size = 2 + +[.vsconfig] +indent_size = 2 +end_of_line = lf + +[*.sln] +indent_style = tab +indent_size = 2 + +[*.{csproj,proj,projitems,shproj}] +indent_size = 2 + +[*.{json,slnf}] +indent_size = 2 +end_of_line = lf + +[*.{props,targets}] +indent_size = 2 + +[*.xaml] +indent_size = 2 +charset = utf-8-bom + +[*.xml] +indent_size = 2 +end_of_line = lf + +[*.plist] +indent_size = 2 +indent_style = tab +end_of_line = lf + +[*.manifest] +indent_size = 2 + +[*.appxmanifest] +indent_size = 2 + +[*.{json,css,webmanifest}] +indent_size = 2 +end_of_line = lf + +[web.config] +indent_size = 2 +end_of_line = lf + +[*.sh] +indent_size = 2 +end_of_line = lf + +[*.cs] +# EOL should be normalized by Git. See https://github.com/dotnet/format/issues/1099 +end_of_line = unset + +# See https://github.com/dotnet/roslyn/issues/20356#issuecomment-310143926 +trim_trailing_whitespace = false + +tab_width = 4 +indent_size = 4 + +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true + +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Naming styles + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion + +csharp_indent_labels = one_less_than_current +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent +csharp_style_namespace_declarations = file_scoped:warning +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent diff --git a/test/IconFontTester/.gitignore b/test/IconFontTester/.gitignore new file mode 100644 index 0000000..ef88c20 --- /dev/null +++ b/test/IconFontTester/.gitignore @@ -0,0 +1,403 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +# Single Target Config +solution-config.props +# Publish Profiles +!**/Properties/PublishProfiles/*.pubxml \ No newline at end of file diff --git a/test/IconFontTester/.vscode/extensions.json b/test/IconFontTester/.vscode/extensions.json new file mode 100644 index 0000000..a63ad40 --- /dev/null +++ b/test/IconFontTester/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "unoplatform.vscode" + ], +} diff --git a/test/IconFontTester/.vscode/launch.json b/test/IconFontTester/.vscode/launch.json new file mode 100644 index 0000000..5f87c30 --- /dev/null +++ b/test/IconFontTester/.vscode/launch.json @@ -0,0 +1,56 @@ +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": "Uno Platform Mobile", + "type": "Uno", + "request": "launch", + // any Uno* task will do, this is simply to satisfy vscode requirement when a launch.json is present + "preLaunchTask": "Uno: android | Debug | android-x64" + }, + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": "Debug (Chrome, WebAssembly)", + "type": "chrome", + "request": "launch", + "url": "http://localhost:5000", + "webRoot": "${workspaceFolder}/IconFontTester", + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "timeout": 30000, + "preLaunchTask": "build-wasm", + "server": { + "runtimeExecutable": "dotnet", + "program": "run", + "args": ["--no-build","-f","net8.0-browserwasm","--launch-profile", "IconFontTester (WebAssembly)"], + "outputCapture": "std", + "timeout": 30000, + "cwd": "${workspaceFolder}/IconFontTester" + } + }, + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": "Uno Platform Desktop (Debug)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build-desktop", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/IconFontTester/bin/Debug/net8.0-desktop/IconFontTester.dll", + "args": [], + "launchSettingsProfile": "IconFontTester (Desktop)", + "env": { + "DOTNET_MODIFIABLE_ASSEMBLIES": "debug" + }, + "cwd": "${workspaceFolder}/IconFontTester", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, + ] +} diff --git a/test/IconFontTester/.vscode/settings.json b/test/IconFontTester/.vscode/settings.json new file mode 100644 index 0000000..23133fc --- /dev/null +++ b/test/IconFontTester/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.expand": false, + "explorer.fileNesting.patterns": { + "*.xaml": "$(capture).xaml.cs" + } +} diff --git a/test/IconFontTester/.vscode/tasks.json b/test/IconFontTester/.vscode/tasks.json new file mode 100644 index 0000000..da031fa --- /dev/null +++ b/test/IconFontTester/.vscode/tasks.json @@ -0,0 +1,57 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build-wasm", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/IconFontTester/IconFontTester.csproj", + "/property:GenerateFullPaths=true", + "/property:TargetFramework=net8.0-browserwasm", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish-wasm", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/IconFontTester/IconFontTester.csproj", + "/property:GenerateFullPaths=true", + "/property:TargetFramework=net8.0-browserwasm", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "build-desktop", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/IconFontTester/IconFontTester.csproj", + "/property:GenerateFullPaths=true", + "/property:TargetFramework=net8.0-desktop", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish-desktop", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/IconFontTester/IconFontTester.csproj", + "/property:GenerateFullPaths=true", + "/property:TargetFramework=net8.0-desktop", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + } + ] +} diff --git a/test/IconFontTester/.vsconfig b/test/IconFontTester/.vsconfig new file mode 100644 index 0000000..7c56eec --- /dev/null +++ b/test/IconFontTester/.vsconfig @@ -0,0 +1,38 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Component.CoreEditor", + "Microsoft.VisualStudio.Workload.CoreEditor", + "Microsoft.NetCore.Component.SDK", + "Microsoft.NetCore.Component.DevelopmentTools", + "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", + "Microsoft.VisualStudio.Component.TextTemplating", + "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", + "Microsoft.NetCore.Component.Web", + "Microsoft.VisualStudio.Component.IISExpress", + "Component.Microsoft.Web.LibraryManager", + "Microsoft.VisualStudio.ComponentGroup.Web", + "Microsoft.VisualStudio.Component.Web", + "Microsoft.VisualStudio.ComponentGroup.Web.Client", + "Microsoft.VisualStudio.Workload.NetWeb", + "Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites", + "Microsoft.VisualStudio.Workload.Azure", + "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine", + "Microsoft.VisualStudio.Component.Windows10SDK.19041", + "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", + "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", + "Microsoft.VisualStudio.Component.Debugger.JustInTime", + "Microsoft.VisualStudio.Workload.ManagedDesktop", + "Microsoft.Component.NetFX.Native", + "Microsoft.VisualStudio.Component.Graphics", + "Microsoft.VisualStudio.Component.Merq", + "Component.Xamarin.RemotedSimulator", + "Microsoft.VisualStudio.Component.MonoDebugger", + "Microsoft.VisualStudio.ComponentGroup.Maui.All", + "Component.Android.SDK34", + "Component.Android.SDK33", + "Component.OpenJDK", + "Microsoft.VisualStudio.Workload.NetCrossPlat", + "Microsoft.VisualStudio.Workload.NetCoreTools" + ] +} diff --git a/test/IconFontTester/Directory.Build.props b/test/IconFontTester/Directory.Build.props new file mode 100644 index 0000000..8daf569 --- /dev/null +++ b/test/IconFontTester/Directory.Build.props @@ -0,0 +1,15 @@ + + + enable + enable + true + + + $(NoWarn);NU1507;NETSDK1201;PRI257 + + diff --git a/test/IconFontTester/Directory.Build.targets b/test/IconFontTester/Directory.Build.targets new file mode 100644 index 0000000..f75adf7 --- /dev/null +++ b/test/IconFontTester/Directory.Build.targets @@ -0,0 +1,2 @@ + + diff --git a/test/IconFontTester/Directory.Packages.props b/test/IconFontTester/Directory.Packages.props new file mode 100644 index 0000000..9942e71 --- /dev/null +++ b/test/IconFontTester/Directory.Packages.props @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/test/IconFontTester/IconFontTester.sln b/test/IconFontTester/IconFontTester.sln new file mode 100644 index 0000000..69338a1 --- /dev/null +++ b/test/IconFontTester/IconFontTester.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35208.52 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconFontTester", "IconFontTester\IconFontTester.csproj", "{6188CAD1-DD76-4BFC-B930-6B598224222E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B03C4B3C-1B76-4199-BC13-98054F0D172A}" + ProjectSection(SolutionItems) = preProject + .gitignore = .gitignore + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets + Directory.Packages.props = Directory.Packages.props + global.json = global.json + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6188CAD1-DD76-4BFC-B930-6B598224222E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6188CAD1-DD76-4BFC-B930-6B598224222E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6188CAD1-DD76-4BFC-B930-6B598224222E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {6188CAD1-DD76-4BFC-B930-6B598224222E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6188CAD1-DD76-4BFC-B930-6B598224222E}.Release|Any CPU.Build.0 = Release|Any CPU + {6188CAD1-DD76-4BFC-B930-6B598224222E}.Release|Any CPU.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {96F135BB-5053-41C8-8EE2-D0992DD405E3} + EndGlobalSection +EndGlobal diff --git a/test/IconFontTester/IconFontTester/App.xaml b/test/IconFontTester/IconFontTester/App.xaml new file mode 100644 index 0000000..a22b897 --- /dev/null +++ b/test/IconFontTester/IconFontTester/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/test/IconFontTester/IconFontTester/App.xaml.cs b/test/IconFontTester/IconFontTester/App.xaml.cs new file mode 100644 index 0000000..1026b9f --- /dev/null +++ b/test/IconFontTester/IconFontTester/App.xaml.cs @@ -0,0 +1,127 @@ +using System; +using Microsoft.Extensions.Logging; +using Uno.Resizetizer; + +namespace IconFontTester; +public partial class App : Application +{ + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + protected Window? MainWindow { get; private set; } + + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + MainWindow = new Window(); + + + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (MainWindow.Content is not Frame rootFrame) + { + // Create a Frame to act as the navigation context and navigate to the first page + rootFrame = new Frame(); + + // Place the frame in the current Window + MainWindow.Content = rootFrame; + + rootFrame.NavigationFailed += OnNavigationFailed; + } + + if (rootFrame.Content == null) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Navigate(typeof(MainPage), args.Arguments); + } + + MainWindow.SetWindowIcon(); + // Ensure the current window is active + MainWindow.Activate(); + } + + /// + /// Invoked when Navigation to a certain page fails + /// + /// The Frame which failed navigation + /// Details about the navigation failure + void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new InvalidOperationException($"Failed to load {e.SourcePageType.FullName}: {e.Exception}"); + } + + /// + /// Configures global Uno Platform logging + /// + public static void InitializeLogging() + { +#if DEBUG + // Logging is disabled by default for release builds, as it incurs a significant + // initialization cost from Microsoft.Extensions.Logging setup. If startup performance + // is a concern for your application, keep this disabled. If you're running on the web or + // desktop targets, you can use URL or command line parameters to enable it. + // + // For more performance documentation: https://platform.uno/docs/articles/Uno-UI-Performance.html + + var factory = LoggerFactory.Create(builder => + { +#if __WASM__ + builder.AddProvider(new global::Uno.Extensions.Logging.WebAssembly.WebAssemblyConsoleLoggerProvider()); +#elif __IOS__ || __MACCATALYST__ + builder.AddProvider(new global::Uno.Extensions.Logging.OSLogLoggerProvider()); +#else + builder.AddConsole(); +#endif + + // Exclude logs below this level + builder.SetMinimumLevel(LogLevel.Information); + + // Default filters for Uno Platform namespaces + builder.AddFilter("Uno", LogLevel.Warning); + builder.AddFilter("Windows", LogLevel.Warning); + builder.AddFilter("Microsoft", LogLevel.Warning); + + // Generic Xaml events + // builder.AddFilter("Microsoft.UI.Xaml", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.VisualStateGroup", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.StateTriggerBase", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.UIElement", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.FrameworkElement", LogLevel.Trace ); + + // Layouter specific messages + // builder.AddFilter("Microsoft.UI.Xaml.Controls", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.Controls.Layouter", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.Controls.Panel", LogLevel.Debug ); + + // builder.AddFilter("Windows.Storage", LogLevel.Debug ); + + // Binding related messages + // builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug ); + // builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug ); + + // Binder memory references tracking + // builder.AddFilter("Uno.UI.DataBinding.BinderReferenceHolder", LogLevel.Debug ); + + // DevServer and HotReload related + // builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Information); + + // Debug JS interop + // builder.AddFilter("Uno.Foundation.WebAssemblyRuntime", LogLevel.Debug ); + }); + + global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory = factory; + +#if HAS_UNO + global::Uno.UI.Adapter.Microsoft.Extensions.Logging.LoggingAdapter.Initialize(); +#endif +#endif + } +} diff --git a/test/IconFontTester/IconFontTester/Assets/Fonts/.DS_Store b/test/IconFontTester/IconFontTester/Assets/Fonts/.DS_Store new file mode 100644 index 0000000..1db43af Binary files /dev/null and b/test/IconFontTester/IconFontTester/Assets/Fonts/.DS_Store differ diff --git a/test/IconFontTester/IconFontTester/Assets/Icons/icon.svg b/test/IconFontTester/IconFontTester/Assets/Icons/icon.svg new file mode 100644 index 0000000..a15af53 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Assets/Icons/icon.svg @@ -0,0 +1,42 @@ + + + + + + diff --git a/test/IconFontTester/IconFontTester/Assets/Icons/icon_foreground.svg b/test/IconFontTester/IconFontTester/Assets/Icons/icon_foreground.svg new file mode 100644 index 0000000..8ffc41a --- /dev/null +++ b/test/IconFontTester/IconFontTester/Assets/Icons/icon_foreground.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/IconFontTester/IconFontTester/Assets/SharedAssets.md b/test/IconFontTester/IconFontTester/Assets/SharedAssets.md new file mode 100644 index 0000000..1b84a74 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Assets/SharedAssets.md @@ -0,0 +1,32 @@ +# Shared Assets + +See documentation about assets here: https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-assets.md + +## Here is a cheat sheet + +1. Add the image file to the `Assets` directory of a shared project. +2. Set the build action to `Content`. +3. (Recommended) Provide an asset for various scales/dpi + +### Examples + +```text +\Assets\Images\logo.scale-100.png +\Assets\Images\logo.scale-200.png +\Assets\Images\logo.scale-400.png + +\Assets\Images\scale-100\logo.png +\Assets\Images\scale-200\logo.png +\Assets\Images\scale-400\logo.png +``` + +### Table of scales + +| Scale | WinUI | iOS/MacCatalyst | Android | +|-------|:-----------:|:---------------:|:-------:| +| `100` | scale-100 | @1x | mdpi | +| `125` | scale-125 | N/A | N/A | +| `150` | scale-150 | N/A | hdpi | +| `200` | scale-200 | @2x | xhdpi | +| `300` | scale-300 | @3x | xxhdpi | +| `400` | scale-400 | N/A | xxxhdpi | diff --git a/test/IconFontTester/IconFontTester/Assets/Splash/splash_screen.svg b/test/IconFontTester/IconFontTester/Assets/Splash/splash_screen.svg new file mode 100644 index 0000000..8ffc41a --- /dev/null +++ b/test/IconFontTester/IconFontTester/Assets/Splash/splash_screen.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/IconFontTester/IconFontTester/GlobalUsings.cs b/test/IconFontTester/IconFontTester/GlobalUsings.cs new file mode 100644 index 0000000..eeafbe3 --- /dev/null +++ b/test/IconFontTester/IconFontTester/GlobalUsings.cs @@ -0,0 +1,4 @@ +global using System.Collections.Immutable; +global using Microsoft.Extensions.DependencyInjection; +global using Microsoft.Extensions.Logging; +global using ApplicationExecutionState = Windows.ApplicationModel.Activation.ApplicationExecutionState; diff --git a/test/IconFontTester/IconFontTester/IconFontTester.csproj b/test/IconFontTester/IconFontTester/IconFontTester.csproj new file mode 100644 index 0000000..afad1f4 --- /dev/null +++ b/test/IconFontTester/IconFontTester/IconFontTester.csproj @@ -0,0 +1,47 @@ + + + net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041;net8.0-browserwasm;net8.0-desktop + + Exe + true + + + IconFontTester + + uno.platform.IconFontTester + + 1.0 + 1 + + Uno Platform + + IconFontTester powered by Uno Platform. + + + + + + + + + + + + + Always + + + + diff --git a/test/IconFontTester/IconFontTester/MainPage.xaml b/test/IconFontTester/IconFontTester/MainPage.xaml new file mode 100644 index 0000000..9e7f096 --- /dev/null +++ b/test/IconFontTester/IconFontTester/MainPage.xaml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/IconFontTester/IconFontTester/MainPage.xaml.cs b/test/IconFontTester/IconFontTester/MainPage.xaml.cs new file mode 100644 index 0000000..d351bc0 --- /dev/null +++ b/test/IconFontTester/IconFontTester/MainPage.xaml.cs @@ -0,0 +1,56 @@ +using Newtonsoft.Json; +using System.Collections.ObjectModel; +using System.Text; +using Uno.IconFontTester; +using Uno.IconFontTester.Models; +using Windows.System; + +namespace IconFontTester; + +public sealed partial class MainPage : Page +{ + public MainPage() + { + this.InitializeComponent(); +#if !NETFX_CORE + ConfigurationPanel.Visibility = Visibility.Collapsed; +#endif + } + + protected override async void OnNavigatedTo(NavigationEventArgs e) + { + base.OnNavigatedTo(e); + Refresh(); + } + + public ObservableCollection Glyphs { get; } = new ObservableCollection(); + + public async void OpenSelectionFolder() + { + var folder = await ApplicationData.Current.LocalFolder.CreateFolderAsync("UnoIconTest", CreationCollisionOption.OpenIfExists); + await Launcher.LaunchFolderAsync(folder); + } + + public async void Refresh() + { + Glyphs.Clear(); +#if NETFX_CORE + var folder = await ApplicationData.Current.LocalFolder.CreateFolderAsync("UnoIconTest", CreationCollisionOption.OpenIfExists); + var file = (await folder.TryGetItemAsync("selection.json")) as StorageFile; +#else + var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/Fonts/selection.json")); +#endif + if (file != null) + { + var text = await FileIO.ReadTextAsync(file); + var icoMoon = JsonConvert.DeserializeObject(text); + var glyphs = icoMoon.Icons.Select(i => i.Properties.Code /*Convert.ToString(i.Properties.Code, 16)*/).OrderBy(i => i).ToList(); + foreach (var glyph in glyphs) + { + var bytes = BitConverter.GetBytes((ushort)glyph); + var glyphText = Encoding.Unicode.GetString(bytes); + Glyphs.Add(new IconItem(Convert.ToString(glyph, 16), glyphText)); + } + } + } +} diff --git a/test/IconFontTester/IconFontTester/Models/IcoMoon.cs b/test/IconFontTester/IconFontTester/Models/IcoMoon.cs new file mode 100644 index 0000000..ca34a37 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Models/IcoMoon.cs @@ -0,0 +1,270 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Uno.IconFontTester; + +public partial class IcoMoon +{ + [JsonProperty("IcoMoonType")] + public string IcoMoonType { get; set; } + + [JsonProperty("icons")] + public IconElement[] Icons { get; set; } + + [JsonProperty("height")] + public long Height { get; set; } + + [JsonProperty("metadata")] + public IcoMoonMetadata Metadata { get; set; } + + [JsonProperty("preferences")] + public Preferences Preferences { get; set; } +} + +public partial class IconElement +{ + //[JsonProperty("icon")] + //public IconIcon Icon { get; set; } + + //[JsonProperty("attrs")] + //public Attr[] Attrs { get; set; } + + [JsonProperty("properties")] + public Properties Properties { get; set; } + + //[JsonProperty("setIdx")] + //public long SetIdx { get; set; } + + //[JsonProperty("setId")] + //public long SetId { get; set; } + + //[JsonProperty("iconIdx")] + //public long IconIdx { get; set; } +} + +public partial class Attr +{ + [JsonProperty("fill")] + public Fill Fill { get; set; } +} + +public partial class IconIcon +{ + [JsonProperty("paths")] + public string[] Paths { get; set; } + + [JsonProperty("attrs")] + public Attr[] Attrs { get; set; } + + [JsonProperty("isMulticolor")] + public bool IsMulticolor { get; set; } + + [JsonProperty("isMulticolor2")] + public bool IsMulticolor2 { get; set; } + + [JsonProperty("grid")] + public long Grid { get; set; } + + [JsonProperty("tags")] + public string[] Tags { get; set; } + + [JsonProperty("colorPermutations")] + public ColorPermutations ColorPermutations { get; set; } +} + +public partial class ColorPermutations +{ + [JsonProperty("17481881")] + public The17481881[] The17481881 { get; set; } +} + +public partial class The17481881 +{ + [JsonProperty("f")] + public long F { get; set; } +} + +public partial class Properties +{ + [JsonProperty("order")] + public long Order { get; set; } + + [JsonProperty("id")] + public long Id { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("prevSize")] + public long PrevSize { get; set; } + + [JsonProperty("code")] + public long Code { get; set; } +} + +public partial class IcoMoonMetadata +{ + [JsonProperty("name")] + public string Name { get; set; } +} + +public partial class Preferences +{ + [JsonProperty("showGlyphs")] + public bool ShowGlyphs { get; set; } + + [JsonProperty("showQuickUse")] + public bool ShowQuickUse { get; set; } + + [JsonProperty("showQuickUse2")] + public bool ShowQuickUse2 { get; set; } + + [JsonProperty("showSVGs")] + public bool ShowSvGs { get; set; } + + [JsonProperty("fontPref")] + public FontPref FontPref { get; set; } + + [JsonProperty("imagePref")] + public ImagePref ImagePref { get; set; } + + [JsonProperty("historySize")] + public long HistorySize { get; set; } + + [JsonProperty("showCodes")] + public bool ShowCodes { get; set; } + + [JsonProperty("gridSize")] + public long GridSize { get; set; } +} + +public partial class FontPref +{ + [JsonProperty("prefix")] + public string Prefix { get; set; } + + [JsonProperty("metadata")] + public FontPrefMetadata Metadata { get; set; } + + [JsonProperty("metrics")] + public Metrics Metrics { get; set; } + + [JsonProperty("embed")] + public bool Embed { get; set; } + + [JsonProperty("includeMetadata")] + public bool IncludeMetadata { get; set; } + + [JsonProperty("showMetrics")] + public bool ShowMetrics { get; set; } + + [JsonProperty("showSelector")] + public bool ShowSelector { get; set; } + + [JsonProperty("showMetadata")] + public bool ShowMetadata { get; set; } + + [JsonProperty("showVersion")] + public bool ShowVersion { get; set; } +} + +public partial class FontPrefMetadata +{ + [JsonProperty("fontFamily")] + public string FontFamily { get; set; } + + [JsonProperty("majorVersion")] + public long MajorVersion { get; set; } + + [JsonProperty("minorVersion")] + public long MinorVersion { get; set; } +} + +public partial class Metrics +{ + [JsonProperty("emSize")] + public long EmSize { get; set; } + + [JsonProperty("baseline")] + public double Baseline { get; set; } + + [JsonProperty("whitespace")] + public long Whitespace { get; set; } +} + +public partial class ImagePref +{ + [JsonProperty("prefix")] + public string Prefix { get; set; } + + [JsonProperty("png")] + public bool Png { get; set; } + + [JsonProperty("useClassSelector")] + public bool UseClassSelector { get; set; } + + [JsonProperty("color")] + public long Color { get; set; } + + [JsonProperty("bgColor")] + public long BgColor { get; set; } + + [JsonProperty("classSelector")] + public string ClassSelector { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } +} + +public enum Fill { Rgb000 }; + +internal static class Converter +{ + public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings + { + MetadataPropertyHandling = MetadataPropertyHandling.Ignore, + DateParseHandling = DateParseHandling.None, + Converters = + { + FillConverter.Singleton, + new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal } + }, + }; +} + +internal class FillConverter : JsonConverter +{ + public override bool CanConvert(Type t) => t == typeof(Fill) || t == typeof(Fill?); + + public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) return null; + var value = serializer.Deserialize(reader); + if (value == "rgb(0, 0, 0)") + { + return Fill.Rgb000; + } + throw new Exception("Cannot unmarshal type Fill"); + } + + public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer) + { + if (untypedValue == null) + { + serializer.Serialize(writer, null); + return; + } + var value = (Fill)untypedValue; + if (value == Fill.Rgb000) + { + serializer.Serialize(writer, "rgb(0, 0, 0)"); + return; + } + throw new Exception("Cannot marshal type Fill"); + } + + public static readonly FillConverter Singleton = new FillConverter(); +} diff --git a/test/IconFontTester/IconFontTester/Models/IconItem.cs b/test/IconFontTester/IconFontTester/Models/IconItem.cs new file mode 100644 index 0000000..3b649de --- /dev/null +++ b/test/IconFontTester/IconFontTester/Models/IconItem.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Uno.IconFontTester.Models; + +public class IconItem +{ + public IconItem(string id, string glyph) + { + Id = id; + Glyph = glyph; + } + + public string Id { get; set; } + + public string Glyph { get; set; } +} diff --git a/test/IconFontTester/IconFontTester/Package.appxmanifest b/test/IconFontTester/IconFontTester/Package.appxmanifest new file mode 100644 index 0000000..7d40f4b --- /dev/null +++ b/test/IconFontTester/IconFontTester/Package.appxmanifest @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/Android/AndroidManifest.xml b/test/IconFontTester/IconFontTester/Platforms/Android/AndroidManifest.xml new file mode 100644 index 0000000..95ae075 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/Android/Assets/AboutAssets.txt b/test/IconFontTester/IconFontTester/Platforms/Android/Assets/AboutAssets.txt new file mode 100644 index 0000000..210a93b --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Android/Assets/AboutAssets.txt @@ -0,0 +1,22 @@ +To add cross-platform image assets for your Uno Platform app, use the Assets folder +in the shared project instead. Assets in this folder are Android-only assets. + +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories) and given a Build Action of "AndroidAsset". + +These files will be deployed with you package and will be accessible using Android's +AssetManager, like this: + +public class ReadAsset : Activity +{ + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + InputStream input = Assets.Open ("my_asset.txt"); + } +} + +Additionally, some Android functions will automatically load asset files: + +Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); diff --git a/test/IconFontTester/IconFontTester/Platforms/Android/Main.Android.cs b/test/IconFontTester/IconFontTester/Platforms/Android/Main.Android.cs new file mode 100644 index 0000000..9c9f5ca --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Android/Main.Android.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Android.App; +using Android.Content; +using Android.OS; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Com.Nostra13.Universalimageloader.Core; +using Microsoft.UI.Xaml.Media; + +namespace IconFontTester.Droid; +[global::Android.App.ApplicationAttribute( + Label = "@string/ApplicationName", + Icon = "@mipmap/icon", + LargeHeap = true, + HardwareAccelerated = true, + Theme = "@style/AppTheme" +)] +public class Application : Microsoft.UI.Xaml.NativeApplication +{ + public Application(IntPtr javaReference, JniHandleOwnership transfer) + : base(() => new App(), javaReference, transfer) + { + ConfigureUniversalImageLoader(); + } + + private static void ConfigureUniversalImageLoader() + { + // Create global configuration and initialize ImageLoader with this config + ImageLoaderConfiguration config = new ImageLoaderConfiguration + .Builder(Context) + .Build(); + + ImageLoader.Instance.Init(config); + + ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync; + } +} + diff --git a/test/IconFontTester/IconFontTester/Platforms/Android/MainActivity.Android.cs b/test/IconFontTester/IconFontTester/Platforms/Android/MainActivity.Android.cs new file mode 100644 index 0000000..5a67847 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Android/MainActivity.Android.cs @@ -0,0 +1,15 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; +using Android.Views; +using Android.Widget; + +namespace IconFontTester.Droid; +[Activity( + MainLauncher = true, + ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges, + WindowSoftInputMode = SoftInput.AdjustNothing | SoftInput.StateHidden +)] +public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity +{ +} diff --git a/test/IconFontTester/IconFontTester/Platforms/Android/Resources/AboutResources.txt b/test/IconFontTester/IconFontTester/Platforms/Android/Resources/AboutResources.txt new file mode 100644 index 0000000..17e3b13 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Android/Resources/AboutResources.txt @@ -0,0 +1,47 @@ +To add cross-platform image assets for your Uno Platform app, use the Assets folder +in the shared project instead. Resources in this folder are Android-only. + +Images, layout descriptions, binary blobs and string dictionaries can be included +in your application as resource files. Various Android APIs are designed to +operate on the resource IDs instead of dealing with images, strings or binary blobs +directly. + +For example, a sample Android app that contains a user interface layout (main.axml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) +would keep its resources in the "Resources" directory of the application: + +Resources/ + drawable/ + icon.png + + layout/ + main.axml + + values/ + strings.xml + +In order to get the build system to recognize Android resources, set the build action to +"AndroidResource". The native Android APIs do not operate directly with filenames, but +instead operate on resource IDs. When you compile an Android application that uses resources, +the build system will package the resources for distribution and generate a class called "R" +(this is an Android convention) that contains the tokens for each one of the resources +included. For example, for the above Resources layout, this is what the R class would expose: + +public class R { + public class drawable { + public const int icon = 0x123; + } + + public class layout { + public const int main = 0x456; + } + + public class strings { + public const int first_string = 0xabc; + public const int second_string = 0xbcd; + } +} + +You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main +to reference the layout/main.axml file, or R.strings.first_string to reference the first +string in the dictionary file values/strings.xml. diff --git a/test/IconFontTester/IconFontTester/Platforms/Android/Resources/values/Strings.xml b/test/IconFontTester/IconFontTester/Platforms/Android/Resources/values/Strings.xml new file mode 100644 index 0000000..10953d1 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Android/Resources/values/Strings.xml @@ -0,0 +1,5 @@ + + + Hello World, Click Me! + IconFontTester + diff --git a/test/IconFontTester/IconFontTester/Platforms/Android/Resources/values/Styles.xml b/test/IconFontTester/IconFontTester/Platforms/Android/Resources/values/Styles.xml new file mode 100644 index 0000000..c02bd06 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Android/Resources/values/Styles.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/Android/environment.conf b/test/IconFontTester/IconFontTester/Platforms/Android/environment.conf new file mode 100644 index 0000000..fa6c2e3 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Android/environment.conf @@ -0,0 +1,2 @@ +# See this for more details: http://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/ +MONO_GC_PARAMS=bridge-implementation=tarjan,nursery-size=32m,soft-heap-limit=256m \ No newline at end of file diff --git a/test/IconFontTester/IconFontTester/Platforms/Desktop/Program.cs b/test/IconFontTester/IconFontTester/Platforms/Desktop/Program.cs new file mode 100644 index 0000000..ba56aa4 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Desktop/Program.cs @@ -0,0 +1,21 @@ +using Uno.UI.Runtime.Skia; + +namespace IconFontTester; +public class Program +{ + [STAThread] + public static void Main(string[] args) + { + App.InitializeLogging(); + + var host = SkiaHostBuilder.Create() + .App(() => new App()) + .UseX11() + .UseLinuxFrameBuffer() + .UseMacOS() + .UseWindows() + .Build(); + + host.Run(); + } +} diff --git a/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Entitlements.plist b/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Entitlements.plist new file mode 100644 index 0000000..24c3103 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Info.plist b/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Info.plist new file mode 100644 index 0000000..1bb02dd --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,26 @@ + + + + + UIDeviceFamily + + 2 + + LSApplicationCategoryType + public.app-category.utilities + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/icon.appiconset + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Main.maccatalyst.cs b/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Main.maccatalyst.cs new file mode 100644 index 0000000..fc884d4 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Main.maccatalyst.cs @@ -0,0 +1,13 @@ +using UIKit; + +namespace IconFontTester.MacCatalyst; +public class EntryPoint +{ + // This is the main entry point of the application. + public static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(App)); + } +} diff --git a/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json b/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json new file mode 100644 index 0000000..69555e4 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/MacCatalyst/Media.xcassets/LaunchImages.launchimage/Contents.json @@ -0,0 +1,58 @@ +{ + "images": [ + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "640x960", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "subtype": "retina4", + "scale": "2x", + "size": "640x1136", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "768x1024", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "1024x768", + "idiom": "ipad" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "1536x2048", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "2048x1536", + "idiom": "ipad" + } + ], + "properties": {}, + "info": { + "version": 1, + "author": "" + } +} \ No newline at end of file diff --git a/test/IconFontTester/IconFontTester/Platforms/WebAssembly/LinkerConfig.xml b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/LinkerConfig.xml new file mode 100644 index 0000000..eda8e52 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/LinkerConfig.xml @@ -0,0 +1,10 @@ + + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/WebAssembly/Program.cs b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/Program.cs new file mode 100644 index 0000000..82670eb --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/Program.cs @@ -0,0 +1,13 @@ +namespace IconFontTester; + +public class Program +{ + private static App? _app; + + public static int Main(string[] args) + { + Microsoft.UI.Xaml.Application.Start(_ => _app = new App()); + + return 0; + } +} diff --git a/test/IconFontTester/IconFontTester/Platforms/WebAssembly/WasmCSS/Fonts.css b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/WasmCSS/Fonts.css new file mode 100644 index 0000000..4fdd605 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/WasmCSS/Fonts.css @@ -0,0 +1,28 @@ +/** + When adding fonts here, make sure to add them using a base64 data uri, otherwise + fonts loading are delayed, and text may get displayed incorrectly. +*/ + +/* https://github.com/unoplatform/uno/issues/3954 */ +@font-face { + font-family: 'Segoe UI'; + src: local('Segoe UI'), local('-apple-system'), local('BlinkMacSystemFont'), local('Inter'), local('Cantarell'), local('Ubuntu'), local('Roboto'), local('Open Sans'), local('Noto Sans'), local('Helvetica Neue'), local('sans-serif'); +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Light.ttf) format('truetype'); + font-weight: 300; +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Regular.ttf) format('truetype'); + font-weight: 400; +} + +@font-face { + font-family: 'Roboto'; + src: url(./Uno.Fonts.Roboto/Fonts/Roboto-Medium.ttf) format('truetype'); + font-weight: 500; +} diff --git a/test/IconFontTester/IconFontTester/Platforms/WebAssembly/WasmScripts/AppManifest.js b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/WasmScripts/AppManifest.js new file mode 100644 index 0000000..5808d62 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/WasmScripts/AppManifest.js @@ -0,0 +1,3 @@ +var UnoAppManifest = { + displayName: "IconFontTester" +} diff --git a/test/IconFontTester/IconFontTester/Platforms/WebAssembly/manifest.webmanifest b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/manifest.webmanifest new file mode 100644 index 0000000..e7dfe49 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/manifest.webmanifest @@ -0,0 +1,10 @@ +{ + "background_color": "#ffffff", + "description": "IconFontTester", + "display": "standalone", + "name": "IconFontTester", + "short_name": "IconFontTester", + "start_url": "/index.html", + "theme_color": "#ffffff", + "scope": "/" +} diff --git a/test/IconFontTester/IconFontTester/Platforms/WebAssembly/wwwroot/staticwebapp.config.json b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/wwwroot/staticwebapp.config.json new file mode 100644 index 0000000..79c1b17 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/wwwroot/staticwebapp.config.json @@ -0,0 +1,30 @@ +{ + "navigationFallback": { + "rewrite": "/index.html", + "exclude": [ + "*.{css,js}", + "*.{png}", + "*.{c,h,wasm,clr,pdb,dat,txt}" + ] + }, + "routes": [ + { + "route": "/package_*", + "headers": { + "cache-control": "public, immutable, max-age=31536000" + } + }, + { + "route": "/*.ttf", + "headers": { + "cache-control": "public, immutable, max-age=31536000" + } + }, + { + "route": "/*", + "headers": { + "cache-control": "must-revalidate, max-age=3600" + } + } + ] +} diff --git a/test/IconFontTester/IconFontTester/Platforms/WebAssembly/wwwroot/web.config b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/wwwroot/web.config new file mode 100644 index 0000000..8f5a860 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/WebAssembly/wwwroot/web.config @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml b/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml new file mode 100644 index 0000000..d5147f1 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-arm64.pubxml @@ -0,0 +1,22 @@ + + + + + FileSystem + arm64 + win-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml b/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml new file mode 100644 index 0000000..4fea954 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-x64.pubxml @@ -0,0 +1,22 @@ + + + + + FileSystem + x64 + win-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml b/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml new file mode 100644 index 0000000..928cb25 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/Windows/Properties/PublishProfiles/win-x86.pubxml @@ -0,0 +1,22 @@ + + + + + FileSystem + x86 + win-x86 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/iOS/Entitlements.plist b/test/IconFontTester/IconFontTester/Platforms/iOS/Entitlements.plist new file mode 100644 index 0000000..24c3103 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/iOS/Entitlements.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/iOS/Info.plist b/test/IconFontTester/IconFontTester/Platforms/iOS/Info.plist new file mode 100644 index 0000000..ea3dcb4 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/iOS/Info.plist @@ -0,0 +1,43 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + armv7 + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + XSAppIconAssets + Assets.xcassets/icon.appiconset + UIApplicationSupportsIndirectInputEvents + + + + + diff --git a/test/IconFontTester/IconFontTester/Platforms/iOS/Main.iOS.cs b/test/IconFontTester/IconFontTester/Platforms/iOS/Main.iOS.cs new file mode 100644 index 0000000..8d26735 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/iOS/Main.iOS.cs @@ -0,0 +1,13 @@ +using UIKit; + +namespace IconFontTester.iOS; +public class EntryPoint +{ + // This is the main entry point of the application. + public static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(App)); + } +} diff --git a/test/IconFontTester/IconFontTester/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json b/test/IconFontTester/IconFontTester/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json new file mode 100644 index 0000000..69555e4 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json @@ -0,0 +1,58 @@ +{ + "images": [ + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "640x960", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "subtype": "retina4", + "scale": "2x", + "size": "640x1136", + "idiom": "iphone" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "768x1024", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "1x", + "size": "1024x768", + "idiom": "ipad" + }, + { + "orientation": "portrait", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "1536x2048", + "idiom": "ipad" + }, + { + "orientation": "landscape", + "extent": "full-screen", + "minimum-system-version": "7.0", + "scale": "2x", + "size": "2048x1536", + "idiom": "ipad" + } + ], + "properties": {}, + "info": { + "version": 1, + "author": "" + } +} \ No newline at end of file diff --git a/test/IconFontTester/IconFontTester/Platforms/iOS/PrivacyInfo.xcprivacy b/test/IconFontTester/IconFontTester/Platforms/iOS/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..902abb0 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Platforms/iOS/PrivacyInfo.xcprivacy @@ -0,0 +1,41 @@ + + + + + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + E174.1 + + + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + diff --git a/test/IconFontTester/IconFontTester/ReadMe.md b/test/IconFontTester/IconFontTester/ReadMe.md new file mode 100644 index 0000000..93482da --- /dev/null +++ b/test/IconFontTester/IconFontTester/ReadMe.md @@ -0,0 +1,7 @@ +# Getting Started + +Welcome to the Uno Platform! + +To discover how to get started with your new app: https://aka.platform.uno/get-started + +For more information on how to use the Uno.Sdk or upgrade Uno Platform packages in your solution: https://aka.platform.uno/using-uno-sdk \ No newline at end of file diff --git a/test/IconFontTester/IconFontTester/Strings/en/Resources.resw b/test/IconFontTester/IconFontTester/Strings/en/Resources.resw new file mode 100644 index 0000000..ed72000 --- /dev/null +++ b/test/IconFontTester/IconFontTester/Strings/en/Resources.resw @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + IconFontTester-en + + diff --git a/test/IconFontTester/IconFontTester/app.manifest b/test/IconFontTester/IconFontTester/app.manifest new file mode 100644 index 0000000..fe2f599 --- /dev/null +++ b/test/IconFontTester/IconFontTester/app.manifest @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/test/IconFontTester/global.json b/test/IconFontTester/global.json new file mode 100644 index 0000000..29a8d3a --- /dev/null +++ b/test/IconFontTester/global.json @@ -0,0 +1,6 @@ +{ + // To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information. + "msbuild-sdks": { + "Uno.Sdk": "5.4.0-dev.198" + } +}