

Please note that there is no conversion ratio between ‘ sp’ (Android) and ‘ pt’ (iOS), while there is a conversion ratio for the Web. The font size is expressed in logical pixels (Android: sp, iOS: pt, Web: rem) and defines the size of the glyphs. It defines the shape, size and graphics of each of its glyphs. In our IT world, a Font could be understood as a digital file containing the definition of a set of graphically related glyphs with specific size, weight and style. ), a symbol ($ £ … a single piece of a text to display on your screen. In very simple words, a glyph is a character (a, b, D, W…), a figure (0, 1, 2…), a punctuation ( !. In typography, a glyph is an elemental symbol within an agreed set of symbols, intended to represent a readable character for the purpose of writing (ref: wikipedia). Please refer to this article for a more complete explanation related to Typography.
Letterspace vs letter space how to#
how to define your own styles in a controlled manner.īefore going into the details, let’s maybe first introduce some basic notions, which will be used later in this article.how and under what conditions to modify them locally.to explain where and when, by whom they are used (you will find an Excel file which makes an inventory of their use).We take a look at it but at the beginning, we wonder how to use it and we think that we will not be able to get everything by limiting ourselves to it.

On the other hand, we know that there is a notion of Theme in Flutter. This is especially true when you reuse Widgets that you have created from one application to another … Everything is going very well and, very conscientiously, at the start of the application, we limit ourselves to the styles that we have defined but often, sooner or later, we start to create more and more, and even if we force ourselves to only use these styles, again, our app loses its harmony. So, we start to create a class that will contain the list of text styles and give them a name. Having dozens of styles defined throughout your application will make any modification requested by your customers very laborious.Īfter a while, we tell ourselves that with the next application, we will do better. The styles differ from one screen to another, from one component to another… Uncontrolled use of this class often leads to the following problems: I am sure that you see what I’m talking about…įlutter provides a class you probably know, called TextStyle, which allows you to define the style of a text to be displayed using the Text widget. On some screens, we will like to have a title in blue, bold and italic with a size of 28 while on another screen, we will define a size of 26, but not in italic and why not in dark green.

This allows us to test, to respond in real-time to customer requests, to see in real-time what something might look like… and once the screen or the component we are working on satisfies us, we move on to the next one and so on. One of the greatest joys, when you start in Flutter is this freedom to be able to modify the display as you develop. An introduction to the concept of Theme and more specifically to the concept of Text Styles (TextStyle & TextTheme).
