DESIGN

Vol.64

author

Designer

S.N.

No More Blurry Icons! Key Points for Creating SVG Data

#design#Adobe#Photoshop#Illustrator#アイコン#SVG#Retina
Have you ever designed an icon only to find that it looks blurry or fuzzy when displayed in a web browser? In this article, we will introduce important points to keep in mind during the data creation stage before exporting SVG files, as well as additional tips related to exporting that complement our previous article.
stuffstuff

Introduction

In the image below, image A appears sharp and clear, while image B looks blurry.
As devices equipped with high-resolution Retina displays have become widespread, creating images that remain crisp on high-resolution screens has become essential in modern web design.

As a solution to this issue, SVG has gained attention because it is well suited for supporting a variety of screen sizes and resolutions.

What is SVG?

Although SVG itself was developed around 1998, it was not widely adopted for many years because Internet Explorer did not support it as a standard feature.
However, after Internet Explorer 9 added standard support in 2011, and as smartphones and tablets with high-resolution displays became more common, SVG began attracting attention as an image format for the web.

Users increasingly zoom and scale screens across different devices, making scalable image formats more important than ever.
Because SVG images can scale without losing quality, they are particularly effective in these environments.

In TIPS Vol.34, we introduced important points related to exporting SVG files.
This time, we will focus on things to watch out for during the data creation stage before exporting, along with additional export-related tips that supplement the previous article.

TIPS Vol.34: How to Create SVG Files

What Is SVG?

First, let’s look at what SVG is and review its basic characteristics.
SVG has the following features.

  • Scales smoothly because it is vector-based
    SVG stands for Scalable Vector Graphics, a vector image format.
    Because SVG images are drawn using shapes, paths, text, and filter effects rather than individual pixels, they can be resized without losing image quality.
    Bitmap formats such as JPG represent images pixel by pixel, so enlarging them can cause blurring or pixelation.
    With bitmap images, it is common to prepare separate images for desktop and mobile devices, but SVG can scale freely while maintaining image quality, reducing the need to prepare multiple image sizes.
  • Supports CSS and JavaScript animations and effects
    SVG can be used not only through the img tag or as a CSS background image, but also inline within HTML.
    By embedding SVG directly into HTML, more advanced interactions, animations, and visual effects can be added using CSS and JavaScript.
  • Not ideal for highly complex shapes or color gradients
    When SVG is displayed, the browser reads text-based information such as numbers, coordinates, and formulas, then renders the image according to those instructions.
    Because of this process, SVG may become inefficient when handling illustrations with many gradients or extremely complex shapes, leading to slower rendering and heavier processing.
    SVG is most effective for relatively simple graphics such as icons, logos, and interface elements.

Key Points for Creating SVG Data

So, what should you pay attention to when actually creating SVG data?
Here, we will introduce several important points to keep in mind during the design process.

SVG files can be exported from applications such as Illustrator and Photoshop.
In this article, we will assume that icons are being created in Adobe Illustrator and focus on the important points to consider when preparing SVG data in Illustrator.

1. Pay Attention to Pixels in Illustrator

Before creating your SVG data, first check that the following settings are configured correctly.
SVG is a vector format and scales very well, but older browsers such as Internet Explorer 8 and below, Android 2.3 and below, and older versions of iOS Safari have limited or no SVG support.

Because of this, you may still need to provide PNG or JPG alternatives for full browser compatibility.
Since PNG and JPG are bitmap formats, it is important to create artwork aligned properly to the pixel grid in order to avoid blurry or fuzzy rendering.

To ensure your artwork displays cleanly regardless of the final export format, keep the following points in mind.

  • Set units to pixels
    Go to Preferences > General > Units and set the unit to pixels.
How to change pixel preview settings
  • Enable Pixel Preview
    Go to View > Pixel Preview.
    Working in Pixel Preview mode makes it much easier to visually identify blurry edges and rendering issues.
  • Set keyboard increment to 0.5 px
    Go to Preferences > General > Keyboard Increment and set it to 0.5 px.
    This makes it easier to move objects by half-pixel increments when adjusting coordinates later.
How to change pixel preview settings
  • Enable Snap to Pixel
    Go to View > Snap to Pixel.
    This helps anchor points align directly to the pixel grid when moving objects.
  • Align to Pixel Grid
    This function automatically adjusts object positions to the nearest pixel values.
    It is useful when object coordinates accidentally contain decimal values.
Align to Pixel Grid
  • Avoid decimal values in artboard positions and stroke widths
    Decimal coordinate values that do not align to the pixel grid are one of the main causes of blurry rendering.
    Whenever possible, use whole-number values.
  • Set stroke alignment to inside
    To ensure bitmap exports also align cleanly to pixels, set stroke alignment to Inside.
Align to Pixel Grid

2. Be Careful with Object Coordinate Positions

To keep lines sharp and clearly rendered, it is important to pay attention to object coordinate positions in relation to stroke width.

For example, when drawing a straight line with an even-numbered stroke width, placing the line on coordinates containing decimal values can cause the stroke to cross pixel boundaries.
As a result, blurry gray edges may appear due to anti-aliasing.
When the stroke width is an even number, objects should be positioned on whole-number pixel coordinates aligned to the pixel grid.

On the other hand, when the stroke width is an odd number, using whole-number coordinates can cause blurring.
In those cases, shifting the object position by 0.5 pixels allows the line to align perfectly within the pixel grid, producing a much sharper result.

Be careful with object coordinate positions

Export Settings for SVG Files

Once your artwork is complete, the final step is exporting the SVG file.

Have you been exporting SVG files using the default settings without much consideration?
Now is a good opportunity to review the export settings as well.

1. Things to Do Before Exporting

  • Convert all objects to outlines before exporting
    If your artwork contains fonts and they are not outlined, different devices may display different fonts depending on the environment.
    To ensure accurate rendering, convert all text and related objects to outlines before exporting.
  • Use clear and descriptive layer names
    Layer names are included in the generated SVG code after export.
    For better readability and maintainability, use simple and descriptive names with alphanumeric characters whenever possible.
  • Remove unnecessary layers
    To reduce file size, delete hidden or unused layers and any unnecessary objects before exporting the SVG.

2. Key Points for Export Settings

When exporting SVG files, be sure to check the following important settings.

  • Set the SVG Profile to “SVG 1.1”
    Since SVG 1.1 is the document type most widely supported by web browsers, set the SVG profile to SVG 1.1.
  • Convert fonts to outlines
    Converting fonts to outlines prevents font substitution issues that may occur if the viewing device does not have the same fonts installed.
  • Set Image Location to “Embed”
    Embedding images increases file size slightly, but ensures the SVG displays consistently regardless of the viewing environment.
  • Disable “Preserve Illustrator Editing Capabilities”
    If editing capabilities are preserved, the exported SVG file size becomes much larger.
    Disable this option to keep the file lightweight.
    Because of this, it is recommended to separately save the original AI file before exporting.
  • Set Decimal Places to “3” in Advanced Options
    You can specify between 1 and 7 decimal places.
    Higher values increase vector precision but also increase file size.
    Setting the value to 3 provides a good balance between accuracy and lightweight output.
Key points for export settings

Conclusion

What did you think?
If the images you carefully created end up appearing blurry, you may need to recreate the original artwork from scratch.
To avoid the extra work of repeatedly correcting files, proper initial setup during the data creation stage is extremely important.

In our previous TIPS Vol.34 article, we also introduced methods for optimizing and reducing SVG file sizes.
We hope you will find it useful alongside this article as well.

 Reference: Features, Advantages, and Disadvantages of SVG
 Reference: Can SVG Really Be Used for Retina Displays?
 Reference: Why 1px Lines Become Blurry in SVG and Canvas on Browsers
 Reference: Advent Calendar Day 3: SVG Image Diet Techniques to Reduce File Size Even by 1KB

PREV
Vol.63Let’s Deploy a Node.js Applicati…
NEXT
Vol.65Printing Paper Commonly Used in …

MORE FOR YOU