New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement features for font name strings #4

Merged
merged 6 commits into from Jan 8, 2018

Conversation

Projects
None yet
3 participants
@lo48576
Copy link
Contributor

lo48576 commented Jul 15, 2016

I want to get font name with https://github.com/dylanede/rusttype, but it doesn't provide such feature.
I wrote this PR to help implement rusttype feature to get font name (or any useful information to identify fonts).

Types like PlatformEncodingLanguageID or FontNameIter are not implemented in original stb_truetype, but they may be useful and should be in this crate.

@fschutt

This comment has been minimized.

Copy link
Contributor

fschutt commented Oct 21, 2017

@jackpot51 could you look into this?

lo48576 added some commits Jul 15, 2016

Improve platform ID and encoding ID
Make them public and defined `PlatformEncodingID` type which has
both platform ID and encoding ID.
Improve Language ID and example
Now example correctly handles UTF16BE strings.

@lo48576 lo48576 changed the title Implement features for font name strings [WIP] Implement features for font name strings Jan 8, 2018

Rename types and variants to use upper camel case
RFC 0430 says:

> In `CamelCase`, acronyms count as one word: use `Uuid` rather than
> `UUID`.

(See <https://rust-lang.github.io/rfcs/0430-finalizing-naming-conventions.html#fine-points>.)

@lo48576 lo48576 force-pushed the lo48576:font-name branch from d50c4ea to 6adb14e Jan 8, 2018

@lo48576

This comment has been minimized.

Copy link
Contributor

lo48576 commented Jan 8, 2018

  • Rebased onto master (7601fbf).
  • Suppress non_camel_case_types lint for UnicodeEID.
    • It is renamed to UnicodeEid but variants are not CamelCase.
  • Renamed types and variants to use UpperCamelCase.
    • I'm not sure how UnicodeEID::* variants (such as Unicode_2_0_BMP) should be named...

@lo48576 lo48576 changed the title [WIP] Implement features for font name strings Implement features for font name strings Jan 8, 2018

@jackpot51

This comment has been minimized.

Copy link
Member

jackpot51 commented Jan 8, 2018

Looks good, thanks!

@jackpot51 jackpot51 merged commit 0e6f73b into redox-os:master Jan 8, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment