diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2021-10-08 20:50:37 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-07 10:44:52 +0000 |
commit | eec7affb53e406c72c20d10fc14d730ade1761b0 (patch) | |
tree | 3a35fa17bb50ddd1d7db56ea7412f78ab588f022 /documentation/standards.md | |
parent | 3c3e8c4f39405c52f66b3dac655fdd9ee91c8f71 (diff) | |
download | poky-eec7affb53e406c72c20d10fc14d730ade1761b0.tar.gz |
manuals: start of documentation standards document
This first version specifies how to create consistent SGV graphics
(From yocto-docs rev: 370b9e34e9092c9eed22df2e8b2d0bb979487e5c)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/standards.md')
-rw-r--r-- | documentation/standards.md | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/documentation/standards.md b/documentation/standards.md new file mode 100644 index 0000000000..a2274f6d6e --- /dev/null +++ b/documentation/standards.md | |||
@@ -0,0 +1,103 @@ | |||
1 | # Standards for contributing to Yocto Project documentation | ||
2 | |||
3 | This document attemps to standardize the way the Yocto Project | ||
4 | documentation is created. | ||
5 | |||
6 | It is currently a work in progress. | ||
7 | |||
8 | ## Text standards | ||
9 | |||
10 | This section has not been filled yet | ||
11 | |||
12 | ## ReStructured Text Syntax standards | ||
13 | |||
14 | This section has not been filled yet | ||
15 | |||
16 | ## Adding screenshots | ||
17 | |||
18 | The preferred format for adding screenshots is | ||
19 | [Portable Network Graphics (PNG)](https://en.wikipedia.org/wiki/Portable_Network_Graphics). | ||
20 | Compared to the JPEG format, PNG is lossless and compresses screenshots better. | ||
21 | |||
22 | Screenshots are stored in a `figures/` subdirectory. | ||
23 | |||
24 | To include a screenshot in PNG format: | ||
25 | |||
26 | .. image:: figures/user-configuration.png | ||
27 | :align: center | ||
28 | |||
29 | Depending on the size of the image, you may also shrink it | ||
30 | to prevent it from filling the whole page width: | ||
31 | |||
32 | :scale: 50% | ||
33 | |||
34 | For some types of screenshots, for example showing | ||
35 | programs displaying photographs or playing video, the JPEG | ||
36 | format may be more appropriate, because it is better at | ||
37 | compressing real-life images: | ||
38 | |||
39 | .. image:: figures/vlc.jpg | ||
40 | :align: center | ||
41 | :scale: 75% | ||
42 | |||
43 | ## Adding new diagrams | ||
44 | |||
45 | New diagrams should be added in | ||
46 | [Scalable Vector Graphics (SVG) format](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics). | ||
47 | Thanks to this, diagrams render nicely at any zoom level on generated documentation, | ||
48 | instead of being pixelated. | ||
49 | |||
50 | The recommended tool for creating SVG diagrams for the Yocto Project | ||
51 | documentation is [Inkscape](https://inkscape.org/). | ||
52 | |||
53 | ### Colors | ||
54 | |||
55 | The "GNOME HIG Colors" palette is used in our diagrams | ||
56 | (get it from <https://gitlab.gnome.org/Teams/Design/HIG-app-icons/-/blob/master/GNOME%20HIG.gpl> | ||
57 | if you don't get it from Inkscape). | ||
58 | |||
59 | It's easier to use than the default one in Inkscape, | ||
60 | as it has fewer but sufficient colors. This is a way | ||
61 | to guarantee that we use consistent colors across the | ||
62 | diagrams used in our documentation. | ||
63 | |||
64 | See <https://inkscape-manuals.readthedocs.io/en/latest/palette.html> | ||
65 | for details about working with color palettes in Inkscape. | ||
66 | |||
67 | ### Template diagram | ||
68 | |||
69 | The `template/` directory contains a `template.svg` file | ||
70 | to make it easier to create diagrams. | ||
71 | In particular, you can use it to copy standard text, shapes, | ||
72 | arrows and clipart to the new SVG document. | ||
73 | |||
74 | ### Fonts | ||
75 | |||
76 | The recommended font for description text and labels is `Nimbus Roman`, size 10. | ||
77 | Labels are in bold. | ||
78 | |||
79 | `template.svg` contains ready-to-copy labels. | ||
80 | |||
81 | ### Text boxes | ||
82 | |||
83 | Text boxes are rectangle boxes, with rounded corners, and contain centered text | ||
84 | or labels. Their stroke color is slightly darker than their fill color. | ||
85 | |||
86 | See `template.svg` for example boxes with different colors, which are ready | ||
87 | to be reused. | ||
88 | |||
89 | ### Clipart | ||
90 | |||
91 | Only [Public Domain](https://en.wikipedia.org/wiki/Public_domain) | ||
92 | files are accepted for clipart. [Openclipart](https://openclipart.org) | ||
93 | is the best known and recommended source of such clipart. | ||
94 | |||
95 | It is also required to state the source of each new clipart in the commit log, | ||
96 | to make it possible to check its origin. | ||
97 | |||
98 | For the sake of consistency across diagrams, we recommend | ||
99 | to use existing cliparts, whenever possible. | ||
100 | |||
101 | If cliparts in `template.svg` do not satisfy your requirements, you can | ||
102 | add to said file new cliparts, from e.g. Openclipart. Newly added | ||
103 | cliparts shall stay consistent in style and color with existing ones. | ||