Tag: kranthi

Ten Things To Think About When Designing Your iPad App


  

Like most well-designed things, the magic of an iPad app comes from a union of usefulness, usability and meaning. Games aside, the app must be useful by solving a problem that people actually have through the right set of functionality at the right time. It must be easy to use and, just as importantly, easy to get started using, without a lot of pesky setup and learning steps. And it must hold meaning for the user through visual beauty, an emotional connection, personal insights, etc. In this article, we won’t outline the entire design process for creating an iPad app, but we will explore 10 of the key things to think about when designing your app (and planning the design process).

We’ve excluded tips that have already been mentioned in every single iPad design article ever written (such as, “Invite users to touch by presenting real-world metaphors in a skeuomorphic interface� —look it up!). Instead, we’ll focus on what to really think about when doing design work. By reviewing these considerations in the context of your own application, you can assess whether you’re making good decisions about your design.

Take A Goal-Oriented Approach To Simplify Functionality.

Good iPad apps are about simplicity and doing a few things well. This means you have to be selective about the functionality you include and not throw in the kitchen sink. Consider following a goal-oriented approach to figure out what functionality you need. List all of the high-level goals a user might have when using your app (better yet, watch users doing things that you hope your app will help with in order to get a full picture of what the user’s goals are — but that’s an article for another time). What would someone be trying to get done? Then, brainstorm all of the functionality that someone might want in order to accomplish that task. Look at that big list, and start pruning, with an eye for the minimum that is needed to help the user succeed. And then select a few magical, delightful features to complete the package.

For example, Epicurious does an excellent job of giving the multi-tasking cook exactly what they need. When viewing a recipe in landscape format, users can easily scan ingredients on the left while keeping track of the next instruction on the right, with a bright placeholder that can be dragged with the finger to the current spot. Reviews and additional tips for the recipe are easily accessible via tabs, but the main screen is kept clean and uncluttered, with just the basics.


Epicurious provides a clean interface for recipes, with an orange marker to keep your place.

By contrast, the Whole Foods app starts off being helpful by letting you add recipe ingredients to a shopping list. Unfortunately, it neglects to combine repeated ingredients, so items are listed multiple times. In the screenshot below, bananas appear three times, once for each recipe that requires them, instead of being combined into one entry.


Whole Foods should enhance its app by merging duplicate list items.

Also, don’t provide a button for every control the user might need to accomplish their goal. Think about what the user can infer about the UI through gesture. For example, Apple’s Notes app doesn’t have an “editing� mode; instead, you simply touch the screen to bring up the keyboard, and it auto-saves when you’re done. Basic editing controls such as cut, copy and paste also appear only in response to gestures as needed (and undo is accomplished by shaking).

Apple Notes
The Notes app limits on-screen buttons and presents controls only if it detects they are needed.

Leverage What You Know To Create A Fully Personalized Experience.

No one wants to spend a lot of time setting up a $1.99 app. Leverage as much of what the iPad and other websites know about your users as possible (with their permission, of course). Could you use the user’s location, calendar, Twitter feed or contacts list to make the app smarter and more personalized?

Zite is a fabulous RSS reader for iPad that doesn’t wait for you to add sources, but rather connects to your Google Reader, Twitter or Delicious account and then presents articles based on what it has learned about your interests. I connected it with Delicious (where I store all of my bookmarks), and in five seconds it created a personalized magazine for me to explore new and interesting content! And just like Pandora, the more you use it, the more relevant and personalized the content becomes. So far, even though some argue that Flipboard’s UI is more elegant, engaging with Zite is easier because it’s all set up.


Zite sets things up immediately by connecting to an existing account.

Zite Top Stories
Zite created my own personal magazine by learning about my interests through my Delicious account.

Think About The Place Of Use.

Assume that your user will be out and about when using your app — in a restaurant, in the car, in the kitchen, on a sofa, etc. How does that change the list of goals you’ve put together? For a user browsing recipes, are their needs different on the sofa than in the kitchen, or in a restaurant?

Open Table’s Web app for reserving tables displays a list of restaurants as the default view for search results (i.e. without a map). On the iPad, the default view is a large map with a list of restaurants on the right, along with an option to search your vicinity. This accommodates the common use case of someone trying to find a place to eat when they are out and about.


When you’re out and about with the iPad, Open Table shows you what is near.

Awesome Note opens with a set of default categories that reflect the various places that people might take notes on an iPad.


Awesome Note complements traditional categories like “My idea� and “To-do list� with out-and-about categories like “Travel diary� and “Shopping.�

GroceryIQ is a shopping list that organizes items by aisle to speed up shopping. It also allows filtering by store, which is handy.

Grocery IQ
GroceryIQ offers functionality to make your shopping trip more efficient.

Consider Multi-User And Multi-Device Cases.

Assume that multiple members of a family will be sharing an iPad or viewing the device at once. Unlike a personal computer, the iPad is not necessarily a personal device but could be treated more like a coffee-table book or magazine that multiple residents share. In addition to allowing users to switch accounts, indicating who is currently logged in is also important. An added benefit of accounts is that they facilitate syncing between devices (for example, an iPad and a smartphone).

Flipboard is a great example of shared use through multiple accounts. When you sign in, your name is displayed on the home page.

Flipboard
Flipboard makes clear that it knows who you are.


Like Flipboard, FedEx displays the name of the logged-in user (although the app’s heavy grayscale appearance is odd).

eBay, on the other hand, supports accounts but provides no indication of who is signed in until you touch the “My eBay� button in the corner.


eBay doesn’t make clear who is logged in until you touch “My eBay� in the corner.

Don’t Do Crazy Navigation Unless It’s A Game Or One-Hit Wonder.

Crazy, spinny, eye-catching interactions are fine for one-hit wonders and games. But stick with standard navigation for frequently used apps, such as news readers. If you do want to do something innovative, make sure it supports the task at hand and is extremely usable.

Martha Stewart Living, which is built on the well-designed Adobe Digital Publishing Suite, uses horizontal and vertical scrolling in a novel way by reserving horizontal scrolling for navigating between articles and vertical scrolling for navigating pages of an article. This is paired with a clever pane that visually shows how scrolling works, plus an overview of the current issue for even quicker navigation. With all that and a clickable table of contents, the whole experience is quite lovely.


Martha Stewart Living’s overview pane shows the clever horizontal and vertical scrolling scheme for content created with the Adobe Digital Publishing Suite.

The best thing you could do is actually use an iPad constantly for all kinds of things, and see what works for you. You’ll quickly discover inconsistencies and annoyances all over the app world, and you’ll figure out where to be consistent and where to branch out.

Here are three different methods that news readers follow to enable users to exit articles:

Huffington Post exit
Huffington Post: top right.

NY Times exit
New York Times: bottom left.

Zite exit
Zite: top left.

People tend to rest their thumb near the top left when holding an iPad, so putting the button there is easiest because then people wouldn’t have to change their grip. Also, Zite enables you to click anywhere on the screen outside of the article to close it, which makes for a nice flexible gesture. Similarly, the New York Times enables you to pinch an article to close it and return to the home page, which is even better, especially because the controls disappear once an article has been open for a few seconds — although a one-finger gesture closer to the top left would have worked better, because the two-finger gesture would probably require the user to change their grip.

Be mindful of how you yourself use features, and notice when something is usable and when you have to move your hand awkwardly or do something that disrupts your flow. Look around to find apps that do what you’re trying to do, assess their usability, and decide whether being consistent or doing something different would make more sense. iPad apps are still a new frontier, so now is not the time to buckle down and set conventions — but we should assess whether a new idea really adds something useful or is just novel for the sake of novelty.

Provide A Home Page.

People are used to home pages that orient them to what’s available and that give them a base of operations. Without one, discovering and browsing content can be disorienting and frustrating. Take the NASA news app, which has no home page. Upon launching the app, users are dropped directly into a news article. To view other articles, they would use the carousel arrows on the left and right, or press the tiny list icon in the bottom-left corner of the screen. The list view allows users to browse content in a small scrolling pop-over window that has only enough room for thumbnails and short headlines. The navigation is generally unwieldy and disorienting.


NASA does not provide a home page, but rather drops you into an article with vague pop-over navigation.

Pulse, on the other hand, is a great news app that uses a home page to quickly orient users and to introduce the navigation scheme, which is consistent throughout the app. From the home page, users can easily browse content, having plenty of space to view the large thumbnails and article descriptions to see what interests them. Drilling down into an article will collapse the navigation to the side so that you don’t lose context.


Pulse presents a horizontal scrolling list of articles on the home page.


Opening an article will collapse the navigation to a side panel in landscape view.


In portrait view, Pulse displays the navigation for one content source at the bottom, with easy access to the next page.

Beware Of Awkward Pop-Overs.

iPad offers the nifty interaction of a pop-over to help users retrieve content and navigation in context. But the interaction can also make for a jerky flow, cramming a lot of information into a tiny peephole. Given the limited width and height of a pop-over, avoid stuffing too much in it. Awesome Note tries to cram the interaction for editing a list of folders into a small pop-over, presumably to maintain context. Instead, we get a confusing interaction, with tabs duplicated on the screen and not enough room to get things done.

Awesome Note pop-over
Awesome Note has a somewhat confusing pop-over that duplicates the information on the screen in a cramped space.

NASA’s complex navigation, which we saw in the preceding point, is a similar example of a bad pop-over.

Consider when opening a new page would make more sense than opening a pop-over. Unless context is critical, don’t be afraid to take users to a full-screen view to give the content some room to breathe.

Or consider using split views in clever ways:


Houzz has secondary navigation for each category in a convenient split view.


Martha Stewart Living displays the table of contents for an issue as a full-length pop-over, opening up space for images and descriptive headlines.


Flipboard favors a slide-out panel to give the navigation enough room to do its job.

Avoid Gratuitous Splash Screens.

Remember when the Web had splash screen, and then everyone got annoyed and left? They are even more annoying on the iPad because you’re usually trying to access content while someone is waiting for either you or the iPad. If you need a splash screen because something has to load, display it for the minimum amount of time possible. Better yet, display useful content while the rest of the app loads to give users a head start on the interaction.

Zite piques your interest by loading the first few photos on the home page while the rest of the app loads. When the app is ready, those initial photos animate into place, making for a delightful little welcome interaction.


Zite draws you in on the splash screen, with thumbnails of articles that will be ready once the full app loads.

Use Gestures In Clever Ways, But Don’t Overdo It.

Cool, useful gestures are a mainstay of iPad use. But the line between effective gestures and gesture overload is fine. For example, don’t provide a swipeable carousel and then also allow a generic swipe gesture on the same screen, because this would put competing swipe gestures at odds with each other.

And if a gesture is not obvious, give users a hint.


Zite indicates more content with a cute little “swipe� text at the bottom.

Discovr, a music-discovery application, integrates information about gesture controls right into the UI. The red circle in the screenshot below says “Tap me,� leading to information on how to expand nodes.


Discovr educates users with a red dot explaining the gesture options for the current screen.


Once basic information has been provided, another red node appears saying “Tap and hold me,� informing users how to access more content with a new gesture. With this information baked into the app experience itself, users learn about powerful features of the UI without having to be psychic.

Make Clear What’s Touchable, And Make It BIG.

Many apps suffer from what Jakob Nielsen calls “read-tap asymmetry,� whereby the font may be legible in size, but the tappable areas are so small that users are prone to missing the targets or are unsure whether the areas are even tappable. In the advertisement below, from the Martha Stewart Living app, the arrowed questions in the middle of the screen are tappable, but you wouldn’t know it because they have no affordance. If you’re going to go through the trouble of making more content available, then make it clear where to tap, and make the tappable area nice and big.


It’s not obvious where you would tap in this ad to get more information.


It turns out that tapping the light-gray boxes in the middle shows more information.

The image areas at the top of the Cool Hunting application are actually swipeable galleries, but we get no hint of it. What if there was some kind of affordance, such as dimensionality or a peek at another image to indicate there was more to the right?


Cool Hunting does not indicate that swiping the top image would reveal more images, which makes this functionality hard to discover.

In iOS itself, double-tapping the home key and then swiping left in the multitasking bar reveals a bunch of controls for sound and music, yet this functionality is pretty well hidden. Why not provide some affordance of what is available?


Double-tapping home and then swiping left on an iPad reveals hidden functionality.

What Else?

These are just 10 of the many things to consider when designing your iPad app, but it’s a good place to start. We’d love to hear your top considerations and examples in the comments. We especially lack a strong repository on the Web of examples of good and bad iPad app design. Please share examples of the different ways that apps treat the same functionality (such as exiting articles), and explain why certain solutions are better than others. Have you discovered other techniques through your own design work that you think everyone should put on their list of do’s and don’ts? Let us know.

Further Reading

(Cover image: Johan Larsson)

(al)


© Julie Stanford for Smashing Magazine, 2012.


Desktop Wallpaper Calendar: February 2012


  

We always try our best to challenge your artistic abilities and produce some interesting, beautiful and creative artwork. And as designers we usually turn to different sources of inspiration. As a matter of fact, we’ve discovered the best one — desktop wallpapers that are a little more distinctive than the usual crowd. This creativity mission has been going on for over two years now, and we are very thankful to all designers who have contributed and are still diligently contributing each month.

We continue to nourish you with a monthly spoon of inspiration. This post features free desktop wallpapers created by artists across the globe for February 2012. Both versions with a calendar and without a calendar can be downloaded for free. It’s time to freshen up your wallpaper!

Please note that:

  • All images can be clicked on and lead to the preview of the wallpaper,
  • You can feature your work in our magazine by taking part in our Desktop Wallpaper Calendar series. We are regularly looking for creative designers and artists to be featured on Smashing Magazine. Are you one of them?

Colored Edge

"For February, the month of spring, love and 29 days." Designed by Rahul.s from India.

Smashing Wallpaper - february 12

Hungry Owl

"February, just one more cold month.. :)." Designed by Katerina Bobkova from Ukraine.

Smashing Wallpaper - february 12

Hot Drinks

"Which drink will you choose to make you feel better during the cold season?" Designed by Agathe Altwegg from France.

Smashing Wallpaper - february 12

Bold

Designed by Elisabetta Borseti from Italy.

Smashing Wallpaper - february 12

February Prison Break

"We suggest – do not mess with February." Designed by Marek GuziÑ�ski From Rio Creativo from Poland.

Smashing Wallpaper - february 12

All You Need Is Love

"Love is all you need." Designed by Kaspars Dedzis from Latvia.

Smashing Wallpaper - february 12

February Splashes

Designed by Roland Szabу from Hungary.

Smashing Wallpaper - february 12

Penguin Hockey

"No coward plays hockey!" Designed by Cheloveche.ru from Russia.

Smashing Wallpaper - february 12

Mr. & Ms. Nice

Designed by Diana Morgado from Portugal.

Smashing Wallpaper - february 12

Jealous Much?

"Calendar for February 2012." Designed by Annabelle Bay from USA.

Smashing Wallpaper - february 12

Heartbroken

"Illustrated wallpaper for february on the theme of heartbreak.1920 x 1200." Designed by Danae Botha from South Africa.

Smashing Wallpaper - february 12

The Shortest Month

Designed by Forsaken from France.

Smashing Wallpaper - february 12

Kids And Dragon

"My drawings are mostly black-and-white and the year of the Black Dragon inspired me to start drawing another picture. Let the Dragon this year be friendly and playful ;)." Designed by Jelena Tљekulajeva from Estonia.

Smashing Wallpaper - february 12

Heart On A String

"For hopeless romantics that let others play with their heart." Designed by Jacob Giesler from USA.

Smashing Wallpaper - february 12

A Shadow’s Chance

"A nod at Groundhog Day! The artwork provided with a calendar has a winter color, because the groundhog sees his shadow which means six more weeks of winter. And the other (Green) has no calendar and no shadow which denotes anearly spring." Designed by Joseph Brooks from United States.

Smashing Wallpaper - february 12

Be Mine

"A cutsie calendar theme." Designed by Sandi | Pop Up Factory.com from Toronto, ON, Canada.

Smashing Wallpaper - february 12

It’s The Love Signal

"Let’s beam our love to the universe!" Designed by Lew Su-ann from Brunei Darussalam.

Smashing Wallpaper - february 12

Winter Church

Designed by Pietje Precies from The Netherlands.

Smashing Wallpaper - february 12

Lock Your Love

"February is the month of couples and love, so if you do have that one special person in your life! Then this would be the prefect month to show how much you love her or him :)." Designed by Rihards Gromuls from Latvia.

Smashing Wallpaper - february 12

Cyclops Encounter

"I am a big fan of the Odyssey. Cyclopses are awesome." Designed by Glorm from Canada.

Smashing Wallpaper - february 12

Gloomy Light

"Sometimes we ever feel’s like useless, moody, gloomy, that’s so sadly. Maybe it just like an old gloomy paper effect on my calendar template. But, we can change it with give it colors, this year our life will be not far from heaviness like our years before, just bright it up and make a colors in your moody days!" Designed by Dwi Prastika from Indonesia.

Smashing Wallpaper - february 12

Chillout

"Once upon a time, in a land far, far away, where you will not be online…" Designed by Chilid Interactive Agency from Poland.

Smashing Wallpaper - february 12

All You Need Is Love

"The Beatles said it best! Love is all you need." Designed by Allison Brown from Canada.

Smashing Wallpaper - february 12

Fight For You

"This valentine we should fight for the ones we love." Designed by Tonie Tannous from Lebanon.

Smashing Wallpaper - february 12

Ice Melted

"Ice melted is coming back soon." Designed by Yank from France.

Smashing Wallpaper - february 12

Load Time

"What Scott Adams means about load time." Designed by Fredrik Jensen from Norway.

Smashing Wallpaper - february 12

Love Is In The Air

Designed by Andreas Sofantzis from Greece.

Smashing Wallpaper - february 12

Join In Next Month!

Please note that we respect and carefully consider the ideas and motivation behind each and every artist’s work. This is why we give all artists the full freedom to explore their creativity and express emotions and experience throughout their works. This is also why the themes of the wallpapers weren’t anyhow influenced by us, but rather designed from scratch by the artists themselves.

A big thank you to all designers for their participation. Join in next month!

What’s Your Favourite?

What’s your favorite theme or wallpaper for this month? Please let us know in the comment section below! We are looking forward to your submissions next month!

(il) (vf)


© Smashing Editorial Team for Smashing Magazine, 2012.


Responsive Images: How they Almost Worked and What We Need

With a mobile-first responsive design approach, if any part of the process breaks down, your user can still receive a representative image and avoid an unnecessarily large request on a device that may have limited bandwidth. But with several newer browsers implementing an “image prefetchingâ€� feature that allows images to be fetched before parsing the document’s body, some of the web's brightest developers are abandoning responsive images in favor of user agent detection, at least as a temporary solution. For us standardistas, UA detection leaves a bad taste in the mouth. More importantly, as the number and kinds of devices continue to grow, UA detection will quickly become untenable—just as browser detection did back in the bad old days before web standards. What's really needed, argues Mat Marquis, is a new markup element that works the way the HTML5 video element works. Sound crazy? So crazy it just might work.

Pricing Strategy for Creatives

Strategic pricing helps your brand and helps you to make more money. Issuing a price is like handing out a business card—it’s a great branding tool, but be careful about what it says to your market. Beginning relationships with customers at a high price makes the statement: “we’re good at what we do and we know it.” Fighting with a competitor over a low price says “I’m uncertain about my abilities, so I’ll take what I can get.” Failing to use a considered pricing policy will leave you treading water in a sea of design mediocrity, allowing you to just stay afloat while you sell commodities. Jason Blumer explains how to become strategic about your pricing—including three things you can do immediately to kick-start your journey toward strategic pricing.

The Future Of Screen Typography Is In Your Hands


  

We do more reading on the screen today than we did even a year ago. If we are ever to have a golden age of reading on the screen, this might be the start of it.

Tablets, Nooks and Kindles make buying a book or magazine for the screen almost unavoidable. With smartphones, we carry our reading material with us and enjoy instant Web access, enabling the reading experience to flow smoothly from one device to another. And those devices probably have stunning HD reader-friendly screens. Throw in companion services like Readmill and 24symbols, which allow us to share our reading experiences, and we have perfect screen-based access to all aspects of the written word.

So, why isn’t Web and screen typography keeping up?

Good Typography Cannot Be Handcrafted Anymore

In the past, typography was viewed as living only when it reached paper. Once a publication was edited, typeset and printed, it was done. Nothing changed after that. Good typography and readability were the result of skilled typesetters and designers.

Today, typography exists not only on paper but on a multitude of screens. It is subject to many unknown and fluctuating parameters, such as operating system, system fonts, the device and screen itself, the viewport and more. Our experience of typography today changes based on how the page is rendered, because typesetting happens in the browser.

In all of this, the browser is probably the most important part of the screen typography equation. Ironically, the lack of support in modern browsers is the single biggest hurdle to good Web typography.

Type-as-service providers are offering an alternative, with an increasing number of fonts that are fairly cheap and easy for us designers to use when typesetting text. But they, too, want better support of Web typography.

Identifying What’s Missing

Let’s look at some of the basic things that are missing from most, if not all, screen-reading experiences. When we say basic, we mean the things that you read and benefit from whenever you look at a book or magazine on paper or screen.

  • Kerning and spacing of individual characters;
  • Basic ligatures (fi, fl)
  • Other ligatures (fj, ffi, ffl, ffj and more);
  • Lining and old-style numerals;
  • True small-caps;
  • Replacing uppercase with small-caps for abbreviations;
  • Superscripted symbols such as © and â„¢;
  • Language-based quotation marks;
  • Correct replacement of en and em dashes, and the spacing around them;
  • Spacing of ! ( ) [ ] / ; :.

Doesn’t seem like much. Except that it is. The elements in this list are some of the things that help us read, process and understand information. They represent in many ways the difference between how a soulless machine would relate to text and how thinking, organic humans do it.

Those of you who were around during the desktop publishing boom might see similarities. In 1999, QuarkXPress did not support OpenType, InDesign was just born, and you had to use “expert� cuts of fonts to be able to work with small-caps and old-style numerals. So, we had to create workarounds for micro-typography — such as Apple-Script frameworks for QuarkXPress, where the script traversed documents and isolated hyphens, dashes, ligatures and small-caps abbreviations, replacing them with the correct typographical equivalents.

In many ways, 2012 is the new 1999. We have the freedom to work with any font we like via the @font-face selector. But our main tool, the browser, does not have any OpenType features to speak of. We have to create workarounds.

Can we use the same type of solution that we used back in the old days of print?

We say yes.

Time to Fix the Problem

We researched existing JavaScript libraries and found a ton of great stuff. But none focused on micro-typography as a whole. When we started the project, we laid out five clear goals:

  • Correct micro-typography, including as many of the elements in the list above as possible;
  • Degrades so that devices without @font-face or JavaScript support are not negatively affected;
  • OS independence;
  • Browser independence;
  • Correct markup;

We named the project OpenTypography, and we named the solution Typesetter.js.

JavaScript and @font-face and styles disabled.

JavaScript disabled.

JavaScript enabled and @font-face-enhanced Web typography.

Typesetter.js

Typesetter.js has two ingredients: a JavaScript and a custom font file

The JavaScript traverses the DOM, finding and replacing things like quotation marks, ligatures, en and em dashes, ellipses and more. It also finds ©, ®, ™ and wraps them in sup tags.

Most importantly, it finds uppercase abbreviations and wraps them in abbr tags, giving us true small-caps. This is possible thanks to a bit of CSS and the services of font-on-demand houses such as Fontdeck and Typekit.

Finding, replacing and wrapping.

Here is a rundown of how Typesetter.js works.

1. The JavaScript

The code is divided into two parts, giving you the option to use the small-caps replacement. But let’s start by looking at how the small-caps replacement works.

Here is the sample HTML that we will use to explain what the script actually does:

<p class="typo">The fine details of screen typography can be improved with JS-scripts and CSS.</p>

<p class="typo">That is the goal of "Typesetter.js" — an open-source solution by Andreas Carlsson and Jaan Orvet © 2011</p>

Our sample text rendered with Georgia and browser-native typographic features.

In this text, we want to find all-uppercase words.

The code starts by getting all elements of a user-chosen class, in this case .typo. These elements are stored in an array.

mainArray[0] = 'The fine details of screen typography can be improved with JS-scripts and CSS.';
mainArray[1] = 'That is the goal of "Typesetter.js" — an open-source solution by Andreas Carlsson and Jaan Orvet © 2011';

Each array element is then looped one at a time and split into a sub-array containing each word as a string.

subArray[0] = 'The';
subArray[1] = 'fine';
subArray[2] = 'details';
subArray[3] = 'of';
subArray[4] = 'screen';
subArray[5] = 'typography';
subArray[6] = 'can';
subArray[7] = 'be';
subArray[8] = 'improved';
subArray[9] = 'with';
subArray[10] = 'JS-scripts';
subArray[11] = 'and';
subArray[12] = 'CSS.';

Each item in the sub-array is tested to see whether the character count of the word and the count of the uppercase letters (ASCII values between 65 and 90) are equal. If so, the word is treated as an uppercase abbreviation.

The test actually checks the first and last character of the sub-array item. If they are uppercase, then it is fair to assume that the whole word is an uppercase abbreviation, and then we would run a more specific test. Here is what the script returns from our sample text:

  • “Theâ€� = false (do not run specific test)
  • “detailsâ€� = false (do not run specific test)
  • “Andreasâ€� = false (do not run specific test)
  • “CSS.â€� = true (run specific test)
  • “JS-scriptsâ€� = true (run specific test)

As you can see, the test also spots uppercase words when they are used with a hyphen or have an trailing period.

Our special uppercase test creates an index array that holds the indexes of the uppercase words (i.e. it identifies where in the full sentence they occur). After the whole sub-array is tested, we would have the sub-array and the index array containing the all-uppercase indexes.

indexArray[0] = '10';
indexArray[1] = '12';

Now that we know where all of the uppercase words are in the string (i.e. sentence), we can prepare them for small-caps replacement.

Small-caps replacement is done by extracting the word, converting the letters to lowercase, wrapping the whole word in an abbr tag and inserting it into the sub-array again.

subArray[0] = 'The';
subArray[1] = 'fine';
subArray[2] = 'details';
subArray[3] = 'of';
subArray[4] = 'screen';
subArray[5] = 'typography';
subArray[6] = 'can';
subArray[7] = 'be';
subArray[8] = 'improved';
subArray[9] = 'with';
subArray[10] = 'js-scripts';
subArray[11] = 'and';
subArray[12] = 'css.';

Now we only need to convert that array into a string and replace the original HTML element with the new small-caps-ified HTML element.

Before:

<p class="typo">The fine details of screen typography can be improved with JS-scripts and CSS.</p>

<p class="typo">That is the goal of "Typesetter.js" — an open-source solution by Andreas Carlsson and Jaan Orvet © 2011</p>

After:

<p class="typo">The fine details of screen typography can be improved with js-scripts and css.</p>

<p class="typo">That is the goal of "Typesetter.js" — an open-source solution by Andreas Carlsson and Jaan Orvet © 2011</p>

Our sample text set with Tanger Serif from Typolar, using the @font-face rule. Uppercase words are now wrapped in abbr tags.

Nice and neat. Now for the second part of the script, the one that replaces quotation marks, ligatures, en and em dashes, and ellipses; renders characters such as © in superscript; and converts numerals to old style by wrapping them in a user-defined class.

The code is fairly self-explanatory:

var charReplacements = function() {

/* Quotationmarks
‹ = ‹
› = ›
« = «
» = »
‘ = ‘
’ = ’
“ = “
� = �
*/

var quoteCharClose = "»";
var quoteCharOpen = "«";
var triggerID = "#display";
var smallcapsClass = "old-style"

$(triggerID).each(function() {
$(this).find('*').each(function() {
	if (($(this).html()) != 0) {
		if (($(this).find('img').length) === 0) {
		// Performs replaces on any element that is not an

	  	$(this).html( $(this).html().replace(/(\.\.\.(\.)?)|(\.\s\.\s(\.\s)?|(\.\.(\.)?))/g, "…"));
		// Finds and replaces .. | ... | .... with an elipsis

		$(this).html( $(this).html().replace(/fl/g, "fl"));
		// Replaces fl with ligature

		$(this).html( $(this).html().replace(/fi/g, "�"));
		// Replaces fi with ligature

		$(this).html( $(this).html().replace(/\s-\s/g, " ‒ "));
		// Replaces | space en-dash space | with: | space em-dash space |

    		$(this).html( $(this).html().replace(/"([\s\.\,])/g, quoteCharClose + "$1"));
		// Replaces | " space | with | » space |

		$(this).html( $(this).html().replace(/\s"/g, " " +  quoteCharOpen));
		// Replaces | space " | with | space « |

		$(this).html( $(this).html().replace(/(\d+)(?=((?!).)*(-tag with the .old-style-class but ignores digits within a a-tag. Read full explanation here http://www.phpbuilder.com/board/archive/index.php/t-10221442.html

		if ( (($(this).children().length) === 0) || ($('this:contains("u00a9")')) ) {

			$(this).html( $(this).html().replace(/\u00a9/g, "

©

") );
			// Superscripts (c)

			$(this).html( $(this).html().replace(/\u00ae/g, "

®

") );
			// Superscripts (R)
		};
	};
   };

});
});
};

Most of the typographic details in the script are declared in the variables at the beginning. This is the beginning of a “settings� type of solution that we are working towards building.

�Settings� is a pretty important feature because typographic rules change depending on the language; for example, quotation marks and the spacing of em dashes. English, French and German each use different quotation marks, so the designer needs to be able to easily change the typographic settings.

Now we have pretty decent typography in our example:

<p class="typo">The fine details of screen typography can be improved with js-scripts and css.</p>

<p class="typo">That is the goal of «Typesetter.js» — an open-source solution by Andreas Carlsson and Jaan Orvet

©

 2011</p>

Our sample text with much better micro-typography than what the browser supports natively.

We have covered a lot, but the most important part is still to come!

2. The Custom Font File

Let’s move on to the font file itself.

Putting Small-Caps and Old-Style Numerals in Place

Our text is now wrapped in classes; we can use CSS to set it in small-caps and old-style numerals. Since no browser supports OpenType, we cannot use the regular font-variant: small-caps rule, because this would only shrink the uppercase letters, resulting in thinner and lighter characters.

The font-variant: small-caps rule merely shrinks uppercase letters, resulting in thinner and lighter characters. To get real small-caps, we have to use our custom subsetted font file.

The font file we need is a subset of the regular cut; in it, the uppercase characters have been replaced with small-caps characters, and the lining numerals have been replaced with old-style numerals. (Remember the days of “expert set fonts�? It’s a bit like that. If you don’t remember, you’re better off for it.)

We can now specify in our CSS files to use the subset for abbr tags. This will give us true small-caps on the Web and allow us to choose between old-style and lining numerals in our text.

abbr {
   font-family: "Tanger Serif Expert", Cambria, Georgia, serif;
   letter-spacing: 0.15em;
   text-transform: lowercase;
   font-variant: small-caps;
   font-weight: 650;
}

Get the Font File

Fontdeck supports the OpenTypography project by kindly serving subsetted fonts in addition to its main fonts.

Other type services and foundries make subsets available as well. We keep an updated list with examples at OpenTypography.

Create Your Own Font File

If you have experience working with fonts, then creating your own subsetted font files is fairly straightforward.

Open the regular cut in your favorite font editor. Copy the small-caps glyphs, and paste them where the uppercase and lowercase glyphs are. Copy the old-style numerals to where the lining numerals are. Once this is done, you only have to generate a new font file and convert it to all the required Web font formats: TTF, OTF, WOFF, EOT, SVG.

You can easily create your own subsetted custom font file. Just replace uppercase and lowercase glyphs with the small-caps versions and the lining numerals with the old-style ones.

Now you have your own custom Web font ready to be used with Typesetter.js

But be sure to check the license to make sure you are permitted to adjust the font file and to embed it via the @font-face selector.

Get Involved In The Future Of Typesetter.js

We are currently testing Typesetter.js in our Dropbox- and Markdown-based CMS, Skrivr, but Typesetter.js is at a very early stage and needs more development in order to work seamlessly with all of the great things that the Web and digital-screen community is creating.

Mainly, we want it to be faster. Another question we’re facing is whether to use RegEx or not. Also, how do we create a better solution for targeting parts of the DOM and isolating those that shouldn’t be replaced?

You’ll find all the latest information, examples, code and more at OpenTypography, which is also the best place to get in touch and let us know if you are interested in bringing better typography to the screens around us.

(al)


© Andreas Carlsson & Jaan Orvet for Smashing Magazine, 2012.


  •   
  • Copyright © 1996-2010 BlogmyQuery - BMQ. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress