Positioning Text and Designs on Product Types (API Terminology Explained #9)

In this blog post, I will tell you more about how to position text and designs on product types using product configurations. To better understand what we discuss here, read the product type model and the product model first. Then have a look at the product model specification and the supported SVG subset specification.

Positioning Basics

So let’s start. We always want to place text or designs on a product type, e.g. a woman’s shirt. A shirt has different views, e.g. front, back or left arm. In our example we use the front view as you can see in the image above. A view has always a width and height, i.e. size, given in millimeter.

...
<view id="1">
   <name>Vorne</name>
   <size unit="mm">
      <width>697.9391560353288</width>
      <height>697.9391560353288</height>
   </size>
   <perspective>front</perspective>
   ...
</view>
...

Continue reading “Positioning Text and Designs on Product Types (API Terminology Explained #9)”

The Print Type Model (API Terminology Explained #8)

In my last blog post about the font model, I told you about how our font model works and how you can use it to display existing or create new products with text. In this blog post, I will tell you more about our print type model.

Understanding the Print Type Model


In our terminology, a print type or printing type basically defines the technology that is used to apply the layers of the selected print colors to a product type, e.g. a t-shirt, the appearance of the applied colors, e.g. smooth, velvety or pattern, and the colors that can be used for printing. The most common print types flock, flex, special flex and digital printing are illustrated in the picture above.

The common print types can be described as follows:

  • Flock Printing: For flock printing, a computerised blade is used to slice designs out of a soft, velvety material. Using high pressure and temperatures, this design is then pressed onto the fabric.
  • Flex Printing: With flex printing, a large computerised blade is used to cut designs out of a smooth, thin material. This design is then pressed onto the fabric, using high pressure and temperatures.
  • Special Flex Printing: With special flex printing, a large computerised blade is used to cut designs out of a smooth, thin material. This design is then pressed onto the fabric, using high pressure and temperatures.
  • Digital Printing: The colours are printed directly onto the material with a special ink-jet printer. The print places a very thin and soft layer over the material. When printing onto dark-coloured t-shirts, a thin layer of white is applied as a primer before the full design is printed.

A print type has the following characteristics:

  • Core Data: Each print type has right now the following core data: name, description, size, dpi, price and restrictions.
    Name
    and description can be used to display print type information in applications.
    The size defines the maximum size in which one color layer of a design or text can be printed on a product type in millimeter. The dpi attribute tells you with how many dpis the design or text will be printed on the product type, finally.
    The price contains the price of the print type in the currency of the shop that must be payed when using the print type in your product configurations.
    Finally, the restrictions information tell you about general print type restrictions and about restrictions when using the print type in combination with other print types.
    General print type restriction attributes are for example colorSpace, whiteSupported and transparencySupported. The colorSpace tells you about the color space used by this print type. This can be print_colors if only special colors defined for this print type can be used, e.g. for flex and flock printing, rgb if all colors in rgb color space can be used, e.g. for digital printing, or cmyk if all colors in cmyk color space can be used. WhiteSupported and transparencySupported tell you whether transpareny and white color can be printed with this print type.
    Print type restrictions required when using combinations of print types on a product type are maxPrintColorLayers, printableAlongWithPrintTypes and printableAbovePrintTypes. The maxPrintColorLayers attribute defines how many print color layers can be printed above each other when this print type is involved. PrintableAlongWithPrintTypes and printableAbovePrintTypes tells you which print types can be combined in general and which print types can be printed above each other, when printing text over a design for example.
  • Colors: Each print type that uses the print_colors color space also defines one or more colors. Each color has the following data: name, price, resources, fill and restrictions.
    The name attribute contains the name of the print color and can be used for displaying purposes. The price tells you how much the usage of this print color costs.  Fill and resources data can be used for displaying print color panels as well as text and design layers in the print color in your application. While the resources data contains a URL that points to a print color image, e.g. a special flex print color image, the fill attribute contains an rgb hex value that matches the print color image as best as possible. Use the fill data to display text and design layers with the defined color in your applications.
    The restrictions data of a color is basically the printableAbovePrintColors list that defines which other print colors can be printed above this print color.

Continue reading “The Print Type Model (API Terminology Explained #8)”

The Font Model (API Terminology Explained #7)

In my last blog posts, I told you about the essential models you need to understand in order to be able to display existing or create new products and allow your customers to buy them using our checkout. In the next blog posts of the series “API Terminology Explained”, I want to go a bit more into the details and tell you about our font and print type model as well as about how to position text and design on product types and how to calculate product prices. I will  start with the font model in this blog post.

Understanding the Font Model

In our terminology, a font family is a grouping of similar fonts that basically differ in their shape, i.e. regular, bold or italic. A typical font family, e.g. Arial, is illustrated in the picture above. A font family has right now the following characteristics:

  • Core Data: Each font family has a name, a deprecated attribute and a list of allowed print types.
    The  deprecated attribute indicates whether a font is outdated. If a font is outdated it can be used for displaying existing products and render product images but not for creating new products.
    The list of allowed print types contains those print types that allow to print text and use fonts from the font family therefore.
  • Fonts: Each font family also has a list of one or more fonts that belong to one font group, e.g. Arial. The fonts basically differ in their shape, e.g. regular, bold, italic.  A font therefore has a name, a style, a weight and a minimalSize attribute and a list of resources.
    The name is usually used to address a font when displaying existing products or creating new ones.
    Style and weight attribute indicate which special shape shall be used. Thereby, the style can contain values like normal (aka regular) or italic and the weight attribute values like normal (aka regular) or bold. All 4 combinations of the values are allowed.
    The minimalSize attribute defines the minimum size in which this font can be printed on apparel. This value is checked when creating new products.
    The list of resources contains links to the actual font assets required to render fonts in an Adobe Flash/Flex or Javascript application. Right now, we only provide font data in swf format for Flash/Flex applications.

Continue reading “The Font Model (API Terminology Explained #7)”