GithubHelp home page GithubHelp logo

type.js's People

Contributors

kevcenteno avatar nathanford avatar shahzainb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

type.js's Issues

Monotype font for header text example

Slightly odd that the main change you see when you turn on/off type.js is that the monotype font kerning kicks in. Feels weird to use monotype font to show this considering their nature. A dodgy serif might work a little better and be more... ugh 'authentic' forgive that word usage, still pre-coffee

Hyphens Control

I’m bringing up the possibility for this plugin to support ladder suppression, i.e. the ability to detect consecutive line-end hyphens and choose to not hyphenate certain lines. This could be set to only hyphenate one line, or to stop hyphenating after a certain number of consecutive hyphens.

For a graphical example:
ladder-example

For reference, Mathias Nater’s hyphenator.js (https://github.com/mnater/Hyphenator) explicitly does not support ladder suppression, since

There’s no way for Javascript to influence the algorithm for laying out text in the browser. Thus we can’t control how many hyphens occur on subsequent lines nor can we know which words have actually been hyphenated. Hyphenator.js just hyphenates all of them.

how to install

can i ask?how to install type.js via online, like im only put css or js im index.html
thanks

Accessibility with span injection

Individual kerning by span injection has some accessibility trade offs (screen readers pause at every HTML element). This was an issue in Lettering JS which does a similar thing. That has been fixed (as detailed in the issue linked) so could a similar approach be used for Type.js? If that sounds like it could be a possibility I'll try and get a PR together

This looks like an awesome project btw.

License?

Thanks for building these tools. It looks like your intent is to share them for anyone to use, but I don't see a license listed. Would you consider adding an MIT license or something similar?

Readme.md typo ?

index.html and README.md do not seem to be sync'ed:

diff --git a/README.md b/README.md
index 124ff00..19d460a 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ Set rules for how you want to adjust styles to eliminate widows – or any group
 #### Properties
 `widow-adjust` accepts the style property you want to use to fix your paragraph.
 ```CSS
-rag-adjust: padding-right;
+widow-adjust: padding-right;

.editorconfig?

I was

wondering

If you could

please share

your .editorconfig file.

(

Because

code with too much vertical . . . . . . . . and horizontal spacing

is hard for me

to sort in my small mind.

)
;)

Consider adding tags for the repo.

Hi~
Adding tags for repo could specify points in history and mark release points.
It's helpful for user to know the version and status of repository, and would enable wider distribution of the library, for example on CDNJS
Would you please consider on using tags?

Thanks for your great work!!
Piicksarn

Odd line breaks

Lines seem to break prematurely i.e. “… based [gratuitous break] on the feedback …”
screen shot 2015-09-19 at 3 10 16 am

Widow prevention via right-padding sometimes adds too much padding

In this example, here's the default text setting:

Default setting

When I add widow-adjust: padding-right, I would expect type.js to create me a more balanced two-line title (with just the last two words on the second line). Instead by default it does this:

type.js applied

There is no existing margin or padding on the title, and it's the same width as the image.

externalCSS: true flag triggers second request

Hi,

I saw your note about how when the "externalCSS" flag is set to true that an extra request is made to get the contents of the linked stylesheets. You can use the document.styleSheets property which is a list of stylesheet objects on the DOM. The cssText property of these objects should contain the string of the CSS. cssText is available in IE9+, Webkit and also Firefox so you may need to fallback if you have to support < IE9 but it should help you not having to re-request the linked stylesheets.

Typed.js not working well on mobile

I'm using typed.js and it's working perfectly on desktops but not on mobile devices. If you take a look at http://anideaforanapp.com/#!/home from a mobile device and have a look at it from a desktop you'll see how it acts differently where the text seems to freeze and then come up all of a sudden.. it's just odd.

I tried resizing my desktop browser window to see if I can get the same result but I couldn't so it seems like it's not a responsiveness issue.

Add class to P elements (or others) that start with punctuation

Thinking of this as a way to handle hanging punctuation in as abstracted a way as possible. Perhaps something like this:

Define classes that follow the (not yet implemented anywhere) spec as outlined here:
https://css-tricks.com/almanac/properties/h/hanging-punctuation/

So, for a paragraph that begins with double quotation marks, this might be added:

class="beginswith-dq"

or if it's single quotation marks:

class="beginswith-sq"

And if it ends with double quotation marks:

class="endswith-dq"

These could be added wherever necessary, so if it's a quote in a paragraph on its own you might have:

class="beginswith-dq endswith-dq"

There are likely a relatively small number of punctuation marks to consider. I think they should be referenced specifically thought because if you were using CSS to hang the punctuation nicely you would want to only bring it back out a small amount for a single quote and slightly larger amount for double quotes.

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.