docs: logos: Turn 'README' into rST, generate an index and link to images

The logo directory wasn't really referenced from anywhere. Additionally
there wasn't any reasonable index for all the image files which we have.

Turn the README file into rST and display the images it references. Link
to the new index file from the docs page.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Peter Krempa 2023-02-14 15:03:18 +01:00
parent e886274234
commit 0e3970bf9b
4 changed files with 216 additions and 98 deletions

View File

@ -163,3 +163,6 @@ Project development
`New repo setup <newreposetup.html>`__
Procedure for configuring new git repositories for libvirt
`Libvirt logos <logos/index.html>`__
Libvirt logo files and guideline how to use them

View File

@ -1,98 +0,0 @@
Libvirt Logo README
===================
The master SVG files were created in InkScape, using the Overpass font from Red
Hat:
https://overpassfont.org/
Logo formats
============
The following SVG files are provided, along with standard bitmap sizes in PNG
format:
- logo-base.svg
The basic "sardine tin" graphic used to create the other forms of the
libvirt logo.
The tin is rotated by 20 degrees, so its angle matches the angle of the left
side of the letter "v" in the Overpass font
Never use this logo file directly. It exists merely as a base for building
the other logos
- logo-square.svg
The minimal square format logo for libvirt. Simply embeds the word "libvirt"
into the basic logo graphic.
This is intended for use where a compact, square format representation of
the logo is required.
Bitmap sizes: 64, 128, 192, 256 px square
- logo-square-powered.svg
A variant of the square logo for use by 3rd party applications, to advertise
their use of libvirt.
Bitmap sizes: 64, 128, 192, 256 px square
- logo-banner-light.svg
A wide banner format of the logo. Embeds the words "libvirt virtualization
API" into the basic logo graphic. The text is rendered in a light color, so
suitable for placement over a dark background.
Bitmap sizes: 257x92, 800x286 px
- logo-banner-dark.svg
A wide banner format of the logo. Embeds the words "libvirt virtualization
API" into the basic logo graphic. The text is rendered in a dark color, so
suitable for placement over a light background.
Bitmap sizes: 257x92, 800x286 px
- logo-sticker-square.svg
A logo formatted into a square shape with outline, suitable for printing
as a sticker. See https://github.com/terinjokes/StickerConstructorSpec
- logo-sticker-hexagon.svg
A logo formatted into a hexagon shape with outline, suitable for printing
as a sticker. See https://github.com/terinjokes/StickerConstructorSpec
PNG file creation
=================
The bitmap images should not be created in Inkscape, since its anti-aliasing of
the rendered bitmaps is too aggressive, resulting in fuzzy images. Instead the
GIMP is used to create bitmaps as follows:
- File -> Open, select the SVG file
When prompted for the image size, enter 1024 as the width and allow height
to be auto-set based on aspect ratio
- Image -> Scale Image
Enter desired final bitmap size and use "Cubic" as scaling method.
- File -> Export As
It is important to let GIMP render initially at 1024 and then scale down, rather
than rendering directly at the target size, since this the manual scaling step
produces better quality

166
docs/logos/README.rst Normal file
View File

@ -0,0 +1,166 @@
===================
Libvirt Logo README
===================
The master SVG files were created in InkScape, using the Overpass font from Red
Hat:
https://overpassfont.org/
.. contents::
Logo formats
============
The following SVG files are provided, along with standard bitmap sizes in PNG
format:
``logo-base.svg``
-----------------
.. image:: logo-base.svg
The basic "sardine tin" graphic used to create the other forms of the
libvirt logo.
The tin is rotated by 20 degrees, so its angle matches the angle of the left
side of the letter "v" in the Overpass font
Never use this logo file directly. It exists merely as a base for building
the other logos
``logo-square.svg``
-------------------
.. image:: logo-square.svg
The minimal square format logo for libvirt. Simply embeds the word "libvirt"
into the basic logo graphic.
This is intended for use where a compact, square format representation of
the logo is required.
Bitmap sizes: 96, 128, 192, 256 px square
- 96px:
.. image:: logo-square-96.png
- 128px:
.. image:: logo-square-128.png
- 192px:
.. image:: logo-square-192.png
- 256px:
.. image:: logo-square-256.png
``logo-square-powered.svg``
---------------------------
.. image:: logo-square-powered.svg
A variant of the square logo for use by 3rd party applications, to advertise
their use of libvirt.
Bitmap sizes: 96, 128, 192, 256 px square
- 96px:
.. image:: logo-square-powered-96.png
- 128px:
.. image:: logo-square-powered-128.png
- 192px:
.. image:: logo-square-powered-192.png
- 256px:
.. image:: logo-square-powered-256.png
``logo-banner-light.svg``
-------------------------
.. image:: logo-banner-light.svg
A wide banner format of the logo. Embeds the words "libvirt virtualization
API" into the basic logo graphic. The text is rendered in a light color, so
suitable for placement over a dark background.
Bitmap sizes: 256x92, 800x286 px
- 256x92px:
.. image:: logo-banner-light-256.png
- 800x286px:
.. image:: logo-banner-light-800.png
``logo-banner-dark.svg``
------------------------
.. image:: logo-banner-dark.svg
A wide banner format of the logo. Embeds the words "libvirt virtualization
API" into the basic logo graphic. The text is rendered in a dark color, so
suitable for placement over a light background.
Bitmap sizes: 256x92, 800x286 px
- 256x92px:
.. image:: logo-banner-dark-256.png
- 800x286px:
.. image:: logo-banner-dark-800.png
``logo-sticker-square.svg``
---------------------------
.. image:: logo-sticker-square.svg
A logo formatted into a square shape with outline, suitable for printing
as a sticker. See https://github.com/terinjokes/StickerConstructorSpec
``logo-sticker-hexagon.svg``
----------------------------
.. image:: logo-sticker-hexagon.svg
A logo formatted into a hexagon shape with outline, suitable for printing
as a sticker. See https://github.com/terinjokes/StickerConstructorSpec
PNG file creation
=================
The bitmap images should not be created in Inkscape, since its anti-aliasing of
the rendered bitmaps is too aggressive, resulting in fuzzy images. Instead the
GIMP is used to create bitmaps as follows:
- File -> Open, select the SVG file
When prompted for the image size, enter 1024 as the width and allow height
to be auto-set based on aspect ratio
- Image -> Scale Image
Enter desired final bitmap size and use "Cubic" as scaling method.
- File -> Export As
It is important to let GIMP render initially at 1024 and then scale down, rather
than rendering directly at the target size, since this the manual scaling step
produces better quality

View File

@ -29,3 +29,50 @@ foreach file : docs_logo_files
install_web_files += '@0@:@1@'.format(meson.current_source_dir() / file, docs_html_dir / 'logos')
endforeach
html_xslt_gen_install_dir = docs_html_dir / 'logos'
html_xslt_gen = []
# README.rst is formatted as index.html for viewing
html_xslt_gen += {
'name': 'index',
'file': docs_rst2html5_gen.process('README.rst'),
'source': 'docs' / 'logos' / 'README.rst',
'href_base': '../',
}
# --- begin of XSLT processing ---
foreach data : html_xslt_gen
html_filename = data['name'] + '.html'
html_file = custom_target(
html_filename,
input: data.get('file', data['name'] + '.html.in'),
output: html_filename,
command: [
xsltproc_prog,
'--stringparam', 'pagesrc', data.get('source', ''),
'--stringparam', 'builddir', meson.project_build_root(),
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'href_base', data.get('href_base', ''),
'--nonet',
site_xsl,
'@INPUT@',
],
depends: data.get('depends', []),
depend_files: [ page_xsl ],
capture: true,
install: true,
install_dir: html_xslt_gen_install_dir,
)
install_web_deps += html_file
install_web_files += html_file.full_path() + ':' + html_xslt_gen_install_dir
endforeach
html_xslt_gen = []
# --- end of XSLT processing ---