Git Product home page Git Product logo

fvd's Introduction

Font Variation Description

A way to unambiguously, compactly and clearly describe a set of @font-face properties. This is implemented as a simple string. For example.

n4

With these two characters we can choose a font, or generate style and weight information for an @font-face rule.

font-style: normal;
font-weight: normal;

Properties

The order of properties is well defined. Currently:

font-style
font-weight

Forward compatibility is maintained by adding new properties to the end. Possible additions:

font-stretch
font-variant

Values

The possible values for each property are well defined, and a value is required for each property. Values must be a single character. The Font Variation Description value and its equivalent CSS value for each property are as follows.

Each property must have a default value, but may have aliases for use when generating a Font Variation Description. To maintain unambiguous output, there must be no alias return values.

font-style

n: normal  (default)
i: italic
o: oblique

font-weight

1: 100
2: 200
3: 300
4: 400 (default, also recognized as 'normal')
5: 500
6: 600
7: 700 (also recognized as 'bold')
8: 800
9: 900

font-stretch

a: ultra-condensed
b: extra-condensed
c: condensed
d: semi-condensed
n: normal          (default)
e: semi-expanded
f: expanded
g: extra-expanded
h: ultra-expanded

font-variant (not currently in the CSS3 font spec)

n: normal
c: small-caps

Parsing Rules

See compaction test suite, expansion test suite and parser test suite for a complete set of rules.

Examples:

(no properties)
=> n4

font-style: italic;
=> i4

font-weight: normal;
=> n4

font-weight: bold;
=> n7

font-style: normal;
font-weight: 400;
=> n4

font-style: italic;
font-weight: 500;
=> i5

A CSS class name for a single font

wf-droidserif-n7

Describing an entire family of fonts. Here each variation is delimited by a comma.

"Droid Serif:n4,i4,n7,i7"

This string describes four fonts in the family 'Droid Serif':
- Normal
- Italic
- Bold
- Bold Italic

Copyright and License

Copyright (c) 2010 Adobe Systems Incorporated.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

fvd's People

Contributors

bramstein avatar rcarver 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.