Skip to content

Instantly share code, notes, and snippets.

@simonliotier
simonliotier / SwiftUI+CustomFonts+DynamicType.swift
Last active December 11, 2019 14:27
Example of how to get Dynamic Type with custom fonts in SwiftUI
import SwiftUI
/// Example of how to get Dynamic Type with custom fonts in SwiftUI.
struct ContentView: View {
var body: some View {
VStack(spacing: 20) {
Text("A large title").customFont(.largeTitle) // "Optima-ExtraBlack", 28
Text("A body").customFont(.body) // "Kailasa", 16
Text("A caption").customFont(.caption2) // "IowanOldStyle-Italic", 11
}
@robd
robd / bundle_gem_libs.rb
Last active October 27, 2017 17:20
Rubymine bundle dependencies
# This script is to work round the problem of broken RubyMine dependencies for bundle files.
# It uses an undocumented feature for RubyMine (but available in Intellij Idea) to create a
# gems library xml file and update the iml file.
#
# See Rubymine issues:
# https://youtrack.jetbrains.com/issue/RUBY-16428
# https://youtrack.jetbrains.com/issue/RUBY-15026
# https://youtrack.jetbrains.com/issue/RUBY-14542
#
# Usage: