Clicky



How to Build Banners With Custom Fonts Using Just Urls

  • By Mickey Aharony
  • 18 Jul, 2017
Designing fun, visually appealing party banners can be a complicated task if you don’t have enough graphic design experience or know how to use image editing software, such as Photoshop or Sketch. Buying and installing an image editing software, installing custom fonts, designing the graphics and figuring out how to apply a text overlay can […]
Cloudinary is a cloud-based service that provides an end-to-end image and video management solution including uploads, storage, administration, image manipulation and delivery. One example of image manipulation features is Image Text overlays (which is the topic of discussion).
In this post, I will show you how to achieve the image overlay in the example above using Cloudinary, not just with common fonts, but with any custom font of your choice. At the end, you will see how simple, powerful and flexible this solution is compared to using graphics editing software.

1. Setup Cloudinary

Cloudinary is simple to setup and use. You just need to create an account, after which you’re assigned a cloud storage for your images:
Create a FREE Cloudinary account using the signup form .
When you sign up successfully, you’re presented with a dashboard that holds your cloud credentials. You can safely store them for future use:

2. Upload Images

Now that you have a free Cloudinary account, you can give it a test drive. Go to the Media Library and upload some images to your cloud:
As you can see, the upload widget enables you to either upload from your computer or provide a link. Don’t bother about hunting for nice pictures on your computer, you can use what I got you from Pexels .
Click on the thumb showing the image you uploaded and copy the link from the image’s details page.
This is the what the original image looks like after scaled down to 700px width:

Cloudinary Offerings

Before we start implementing the text overlay feature, let me tell you about the core Cloudinary offerings:
  • Storage: We encountered this feature while uploading images to the server.
  • Delivery: The URL we got from the media library is what we use to deliver images from Cloudinary.
  • Transformation: Cloudinary enables you to manipulate images by adjusting URL parameters in the delivery URL. The image above is transformed before delivery by adding the transformation parameter ‘w_700’ which scales the image from it’s original 1,000+ pixel width to 700px.

3. Text Overlay

Text overlays in this context refers to applying characters as a mask on graphic images. This process is commonly used in image editing tools like Photoshop, Sketch or Illustrator, where you import an image to your work art board and use the text control to apply characters above the image. For example:
The text printed on the party background image is what is referred to as “text overlay.”
I used the font Verdana in the “JOHNSONS PRESENT” text in the example above. Verdana is a popular font and is readily available as a common font. However, in some situations, you may need to use custom fonts. In this case, you could  go to a website like dafont.com , download a custom font, install on your machine and use in your designs.
Text overlays are applied as transformation via the transformation parameters, much like what we did with the width of the party image. The following example shows a text overlay on the image:
https://irp-cdn.multiscreensite.com/856d1a5c/pexels-photo-341858_hx5cva.jpg
This URL defines the many features going on with this image transformation:
  • w_700 : Scales down the image to 700px
  • l_text : Defines the overlay text to be placed on the an image. This is a transformation feature.
  • Verdana : Font style
  • 20 : Font size
  • bold : Font weight
  • underline : Text decoration
  • JOHNSONS%20PRESENTS : URL encoded overlay text
  • g_north : Text location which is top of the image.
  • y_25 : y axis offset of the text from the top in percentage
  • co_rgb:F9583 : Text color for the overlay

4. Custom Fonts

Our party banner is taking shape, but to make the banner more festive, we want to add some crazy fonts. We don’t commonly see crazy fonts, hence you shouldn’t expect to see one. This is why you cannot just use l_text:CrazyFont.
Cloudinary is very flexible, though. You can upload your own custom font to Cloudinary, then use its public ID as the l_text value. Midnight Valentine is a typical party font that we can use. Download the zipped file, unzip, and upload the .ttf font file.
(NB: You can only upload .ttf or .otf fonts.)
You need to specify the type as authenticated and resource type as raw . You can do this while uploading via SDKs. Say Node for instance:
var cloudinary = require(’cloudinary’)
// Credentials retrieved from dashboard
cloudinary.config({
 cloud_name: 'CLOUD_NAME',
   api_key: 'API_KEY',
   api_secret: 'API_SECRET'
})
cloudinary.v2.uploader.upload(
   __dirname + '/Midnight-Valentine.ttf',
   {resource_type: 'raw',
   type: 'authenticated',
   public_id: 'Midnight-Valentine.ttf'},
   function(error, result) {
     console.log(result, error)
 })
You can now deliver the image using the custom font we uploaded:
https://irp-cdn.multiscreensite.com/856d1a5c/pexels-photo-341858_hx5cva.jpg
We chained another transformation to what we had before. This time, the l_text ’s font style value is now Midnight-Valentine.ttf which is the public ID of the font we uploaded. We removed the g_north property, as well as the  y property, so the overlay position stays at the default location, which is the center of the image.
Let’s have some more fun adding the venue and date of the party:
https://irp-cdn.multiscreensite.com/856d1a5c/pexels-photo-341858_hx5cva.jpg

Conclusion

The first image shown at the beginning of this article was designed in Sketch. The last image was built by composing parameters in a URL. You can imagine how powerful the latter is. Knowing the right properties in Cloudinary to use will enable you to start generating graphics dynamically without the help of a graphics designer.
You can learn more about these properties from the Cloudinary docs .
 
[– This is an advertorial on behalf of Cloudinary –]

Latest News

By Inessa Brown 21 Jul, 2017
Have you ever encountered a website with confusing navigation? Been sent down the wrong path by misleading labels? Or needed your best detective skills to find a particular piece of content? It’s frustrating, isn’t it? What can companies do to ensure that users can find what they are looking for on a website? Usability testing […]
By Ben Moss 20 Jul, 2017
Google’s minimal search page has consistently been heralded as a minimalist masterpiece since it first appeared in 1996. It’s been argued by numerous designers—myself included—that it was the perception of Google as a ‘pure’ unadulterated search was more central to Google’s rise and eventual dominance, than the merits of its (in)famous algorithm. So it’s something […]
By Ezequiel Bruni 20 Jul, 2017
When I go to any website, I’m looking for something. I may want to buy a product, or find information, or browse random memes, but whatever it is, I have a goal in mind. That goal could even be subconscious, but it’s there. Human beings never do anything without a reason. Whether or not they […]
By _dm_templates 20 Jul, 2017
Red Rocket are pleased to announce the launch of the new website for Gillian Allard the winner of Sky Arts Master Of Photography award for 2017. The website is built on our platform and allows Gillian to update all parts of the website herself.
By Nick Babich 19 Jul, 2017
Transitions are a powerful way to communicate a change in a user interface. They can be used in apps to help offload a lot of the cognitive work into the visual cortex: they help transport users between navigational contexts, explain changes in the arrangement of elements on a screen, and reinforce element hierarchy. Consequently they […]
By Mickey Aharony 18 Jul, 2017
Designing fun, visually appealing party banners can be a complicated task if you don’t have enough graphic design experience or know how to use image editing software, such as Photoshop or Sketch. Buying and installing an image editing software, installing custom fonts, designing the graphics and figuring out how to apply a text overlay can […]
By _dm_templates 18 Jul, 2017

Joan is applying for a small loan on all-online-loanzzz.com. She’s becoming frustrated with the number of financial-disclosure forms she has to fill out. She’s thinking about visiting her local bank to ask for a loan instead.

While waiting for a page to load, the application presents a cartoon image of a person wearing a business suit sitting in a jail cell. The image caption says, “Hey, everyone hates disclosures. We know you do, too. We’re doing our best to keep everyone out of jail. Please bear with us for a few more clicks. You won’t regret it, and our loan officers will stay out of jail.” Joan smirks at the image. She might not appreciate the number of forms she has to complete, but she understands the serious nature of applying for a loan.

Humor is an important aspect of life. Researchers find  humor has many positive benefits . It can reduce stress, increase psychological well being and increase tolerance for pain. Most of us have had experiences in which we’ve used humor to lighten a mood or cheer someone up. Humor is integral and inherent to human relationships.

You can use humor in your design (both in the process and the product) to create a positive user experience. We want to develop positive relationships with our users — humor can help make that happen.

But how do I do this?, you might ask. Do I need to be a comedian? Should I format all of my FAQs as knock-knock jokes? The answer is no to both of those questions. You can incorporate humor in your design, maintain your brand identity and not look like you are trying too hard in the process.


By Cassandra Naji 17 Jul, 2017
2017 looks set to be the year that augmented reality (AR) moves firmly into the mainstream. As the next big technology trend, it looks set to have a massive impact on user experience and, by extension, user experience design. The good news is that augmented reality has the potential to solve user problems that have […]
By Cameron Chapman 16 Jul, 2017
Every week users submit a lot of interesting stuff on our sister site Webdesigner News, highlighting great content from around the web that can be of interest to web designers.  The best way to keep track of all the great stories and news being posted is simply to check out the Webdesigner News site, however, […]
By Jerry King 15 Jul, 2017
Every week we feature a set of comics created exclusively for WDD. The content revolves around web design, blogging and funny situations that we encounter in our daily lives as designers. These great cartoons are created by Jerry King, an award-winning cartoonist who’s one of the most published, prolific and versatile cartoonists in the world […]
More Posts
Share by: