Skip to content

Commit 9713e2d

Browse files
committed
Added a short guide to help creating the Symfony diagrams
1 parent ad66fbc commit 9713e2d

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

_images/sources/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
How to Create Symfony Diagrams
2+
==============================
3+
4+
Creating the Diagram
5+
--------------------
6+
7+
* Use [Dia][1] as the diagramming application;
8+
* Use [PT Sans Narrow][2] as the only font in all diagrams (if possible, use
9+
only the "normal" weight for all contents);
10+
* Use 36pt as the base font size;
11+
* Use 0.10 cm width for lines and shape borders;
12+
* Use the following color palette:
13+
* Text, lines and shape borders: black (#000000)
14+
* Shape backgrounds:
15+
* Grays: dark (#4d4d4d), medium (#b3b3b3), light (#f2f2f2)
16+
* Blue: #b2d4eb
17+
* Red: #ecbec0
18+
* Green: #b2dec7
19+
* Orange: #fddfbb
20+
21+
In case of doubt, check the existing diagrams or ask to the
22+
[Symfony Documentation Team][3].
23+
24+
Saving and Exporting the Diagram
25+
--------------------------------
26+
27+
* Save the original diagram in `*.dia` format in `_images/sources/<folder-name>`;
28+
* Export the diagram to SVG format and save it in `_images/<folder-name>`.
29+
30+
Including the Diagram in the Symfony Docs
31+
-----------------------------------------
32+
33+
Use the following snippet to embed the diagram in the docs:
34+
35+
```
36+
.. raw:: html
37+
38+
<object data="../_images/<folder-name>/<diagram-file-name>.svg" type="image/svg+xml"></object>
39+
```
40+
41+
Reasoning
42+
---------
43+
44+
* Dia was chosen because it's one of the few applications which are free, open
45+
source and compatible with Linux, macOS and Windows.
46+
* Font, colors and line widths were chosen to be similar to the diagrams used
47+
in the best tech books.
48+
49+
Troubleshooting
50+
---------------
51+
52+
* On some macOS systems, Dia cannot be executed as a regular application and
53+
you must run the following console command instead:
54+
`export DISPLAY=:0 && /Applications/Dia.app/Contents/Resources/bin/dia`
55+
56+
[1]: http://dia-installer.de/
57+
[2]: https://fonts.google.com/specimen/PT+Sans+Narrow
58+
[3]: https://symfony.com/doc/current/contributing/code/core_team.html

0 commit comments

Comments
 (0)