Skip to content

Commit

Permalink
Add codebeat badge and fix font finding
Browse files Browse the repository at this point in the history
  • Loading branch information
kenji21 committed Nov 2, 2016
1 parent 3fbe1d0 commit 9a3f46f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased](https://github.com/openium/SwiftiumKit/compare/latest...HEAD)
### Added
travis CI configuration
travis CI configuration / badge in README
Add CodeBeat badge in README

### Changed
nothing
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SwiftiumKit

[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/openium/SwiftiumKit.svg?branch=master)](https://travis-ci.org/openium/SwiftiumKit)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/openium/SwiftiumKit.svg?branch=master)](https://travis-ci.org/openium/SwiftiumKit) [![codebeat badge](https://codebeat.co/badges/036b1ce4-7969-45e0-a903-2b7be50a0e79)](https://codebeat.co/projects/github-com-openium-swiftiumkit)

This "Kit" adds many feature to speed up iOS app development. It is a rewrite of our internal ObjC Kit, but using Swift features, instead of runtime hacks. Unit tests (using given-when-expect format) and documentation are very important.

Expand Down
4 changes: 2 additions & 2 deletions SwiftiumKit/UIFontExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extension UIFont {
/**
Method to get font names 'near' a given name.

Near algorithm removes '_', ' ' (space), '-' characters for searching available fonts
Near algorithm removes '_', ' ' (space), '-' characters from `fontName` for searching available fonts, if a font contains this searched name, it is added to the result array

Usage example :
````
Expand All @@ -51,7 +51,7 @@ extension UIFont {
simplifiedFontName = simplifiedFontName.replacingOccurrences(of: " ", with: "")
simplifiedFontName = simplifiedFontName.replacingOccurrences(of: "_", with: "")
simplifiedFontName = simplifiedFontName.replacingOccurrences(of: "-", with: "")
if simplifiedFontName == searchedFontName {
if simplifiedFontName.contains(searchedFontName) {
maybeFontNames.append(fontName)
}
}
Expand Down

0 comments on commit 9a3f46f

Please sign in to comment.