Giter Club home page Giter Club logo

swiftfontname's Introduction

SwiftFontName

SwiftFontName is font name complements and supports localized font library.

You don't need to search font name any more with SwiftFontName. When using UIFont, you sometimes search font name string because UIFont needs string font name value. Font family name and font name don't have organized naming rule, so it's painful to search correct string. With SwiftFontName, font name candidates shows up when you put first word of font family name.

Version License Platform Carthage compatible

Helvetica

Features

  • Complements for all font names in OS version.
  • Localized font name support.

Usage

Font Name

To start using SwiftFontName, write the following line wherever you want to user font complements:

import SwiftFontName

Then:

FontName.HelveticaNeueLight // HelveticaNeue-Light

It is really simple!

Localized Font Name

And you can select localized font:

LocalizedFontName(FontName.Copperplate, ["ja": FontName.HiraKakuProNW6, "en": FontName.HelveticaNeueLight])

It means that when preferredLanguage is Japanese, use HiraKakuProNW6. And when preferredLanguage is English, use HelveticaNeue-Light. And in other case, use Copperplate.

Requirements

  • iOS8.0 or later
  • Xcode 7.0

Installation

SwiftFontName is available through CocoaPods. To install it, simply add the following line to your Podfile:

use_frameworks!
pod 'SwiftFontName', '~> 2.0.0'
github "morizotter/SwiftFontName" ~> 2.0

Manually

To copy FontName.swift and LocalizedFontName.swift in SwiftFontName directory, you can use this library, too.

Contribution

  1. Fork
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author

Naoki Morita, [email protected]

License

SwiftFontName is available under the MIT license. See the LICENSE file for more info.

swiftfontname's People

Contributors

morizotter avatar gpongelli avatar

Watchers

woshizilong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.