Skip to content

Commit

Permalink
Added google_fonts package for fonts (gfonts - asset)
Browse files Browse the repository at this point in the history
 - Added mirai text theme data in Mirai theme
- Added mirai font family parser
- Added font resource type enum
  • Loading branch information
i-asimkhan committed Jul 26, 2023
1 parent 81aabd2 commit 7605577
Show file tree
Hide file tree
Showing 33 changed files with 1,775 additions and 106 deletions.
25 changes: 5 additions & 20 deletions examples/mirai_gallery/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled.

version:
revision: 9944297138845a94256f1cf37beb88ff9a8e811a
revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
channel: stable

project_type: app
Expand All @@ -13,26 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
- platform: android
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
- platform: ios
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
- platform: linux
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
- platform: macos
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
- platform: web
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
- platform: windows
create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff

# User provided section

Expand Down
5 changes: 4 additions & 1 deletion examples/mirai_gallery/assets/json/example_dark_theme.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"brightness": "dark",
"disabledColor": "#60FFFFFF",
"fontFamily": "Handjet",
"fontFamily": {
"family": "Macondo Swash Caps",
"resource": "gfont"
},
"colorScheme": {
"brightness": "dark",
"primary": "#CCBDFA",
Expand Down
5 changes: 4 additions & 1 deletion examples/mirai_gallery/assets/json/example_light_theme.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"brightness": "light",
"disabledColor": "#60FEF7FF",
"fontFamily": "LisuBosa",
"fontFamily": {
"family": "Handjet",
"resource": "asset"
},
"colorScheme": {
"brightness": "light",
"primary": "#6750a4",
Expand Down
10 changes: 8 additions & 2 deletions examples/mirai_gallery/assets/json/text_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
"style": {
"fontSize": 23,
"fontWeight": "w600",
"fontFamily": "Handjet"
"fontFamily": {
"family": "Handjet",
"resource": "asset"
}
}
},
{
Expand All @@ -42,7 +45,10 @@
"data": "This is a normal Text.",
"style": {
"fontSize": 14,
"fontFamily": "LisuBosa"
"fontFamily": {
"family": "Macondo Swash Caps",
"resource": "gfont"
}
}
},
{
Expand Down
1 change: 1 addition & 0 deletions examples/mirai_gallery/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions examples/mirai_gallery/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
44 changes: 44 additions & 0 deletions examples/mirai_gallery/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
23 changes: 23 additions & 0 deletions examples/mirai_gallery/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PODS:
- Flutter (1.0.0)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- Flutter (from `Flutter`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)

EXTERNAL SOURCES:
Flutter:
:path: Flutter
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943

PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189

COCOAPODS: 1.11.3
Loading

0 comments on commit 7605577

Please sign in to comment.