@enzet/roentgen

中文文档
0.16.0发布于 2026/06/10CC-BY-4.0零依赖近 30 天下载 2976

Set of monochrome 14 × 14 px pixel-aligned map icons

原始使用文档
文档目录11 节
  1. Installation
  2. npm Package
  3. PyPI Package
  4. Design Principles
  5. Requirements
  6. Recommendations
  7. Icon Generation
  8. Command-Line Interface
  9. Grid Drawing
  10. OpenStreetMap Tags
  11. License

Röntgen

Röntgen is a set of monochrome 14 × 14 px pixel-aligned icons. All icons are under the CC BY 4.0 license. You can use them freely, but please give the appropriate credit.

Röntgen was created for the Map Machine project to represent different map features from the OpenStreetMap database. However, it can be easily used for any map project or even for non-map-related projects. Some icons can also be used as emoji symbols. Several Röntgen icons are used in iD editor for OpenStreetMap and other projects using icons from the iD tagging schema.

To use the icons, you can

All icons are stored as optimized SVG files. The majority of them contain only one path element with a minimal number of points. File sizes range from 207 bytes to 4 KB, with mean and median sizes of about 1 KB.

Röntgen icons

All icons follow a common design style inspired by Maki, Osmic, and Temaki.

Feel free to request new icons via issues on GitHub.

Installation

npm Package

Röntgen is available as an npm package:

npm install @enzet/roentgen

After installation, you can use SVG files directly:

import treeIcon from '@enzet/roentgen/icons/tree.svg';

Or use them in HTML:

<img src="node_modules/@enzet/roentgen/icons/tree.svg" alt="Tree icon" />

PyPI Package

Röntgen is available as a PyPI package:

pip install roentgen-icons

After installation, you can use the icons in your Python code:

from roentgen import get_roentgen, Roentgen
from svgwrite.path import Path

instance: Roentgen = get_roentgen()

shape: Shape | None = instance.get_shape("tree")
if shape is not None:
    svg_path: Path = shape.get_svg_path()
    path_commands: str = shape.get_path_commands()

Design Principles

Requirements

  • Icons must be monochrome and not depend on color (they can be recolored without losing their meaning).
  • Maximum icon size is 14 × 14 px (equivalent to 16 × 16 px with one pixel padding).
  • Lines must not be thinner than 1 px. Lines should preferably have an integer pixel width (1 px, 2 px, etc.) for clean rendering at target size.

Recommendations

  • Icon parts should be pixel-aligned for better rendering, when possible.
  • Lines should have rounded caps. Line joins and bends should also be rounded where possible, unless sharp corners are essential to the shape.
  • Prefer fewer details: omit elements that do not contribute to immediate recognition at small sizes. A simpler silhouette reads better than a detailed but cluttered one.
  • Use negative space intentionally: cutouts and gaps inside a filled shape can convey detail without adding strokes, keeping the icon clean.

Icon Generation

The icons directory contains generated and optimized SVG icons. Some of the icons are described with iconscript files in the iconscript directory. Others are generated from sketch SVG files in the data directory by Python scripts. This greatly simplifies the process of creating new icons.

To regenerate icons and preview grids, run

python -m roentgen icons

Command-Line Interface

Grid Drawing

Draw an SVG file with an icon grid.

python -m roentgen grid
OptionDescription
--columnsNumber of columns in the grid
--filterRegular expression for filtering icons
--new-inDraw only icons new in a given version (e.g. --new-in 0.13.0 or --new-in HEAD)
--outputOutput SVG file
--scaleIcons scale

OpenStreetMap Tags

Röntgen was created for the Map Machine, a rendering engine for OpenStreetMap data, and its primary purpose is to represent tags of objects from the OpenStreetMap database.

The data/tags.json file contains a possible mapping from OpenStreetMap tags to Röntgen icons.

License

All Röntgen icons are licensed under the CC BY 4.0. This means you can use them for any purpose, but please give the appropriate credit, e.g.:

Röntgen icons by Sergey Vartanov (CC BY 4.0)

版本与发布记录

@enzet/roentgen 共发布 8 个版本,首次发布于 2025/12/16;过去 12 个月发布了 8 个版本。

版本发布日期距今
0.16.0latest2026/06/105 个月前
0.15.02026/05/136 个月前
0.14.02026/03/177 个月前
0.13.02026/02/099 个月前
0.12.02026/01/169 个月前
0.11.02026/01/0310 个月前

关于 @enzet/roentgen 的常见问题

@enzet/roentgen 是什么?

Set of monochrome 14 × 14 px pixel-aligned map icons

如何安装 @enzet/roentgen?

在项目目录运行 npm install @enzet/roentgen,或使用 pnpm add / yarn add / bun add。

@enzet/roentgen 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/enzet__roentgen 是否存在。

@enzet/roentgen 可以商用吗?

@enzet/roentgen 使用 CC-BY-4.0 许可。声明的许可为 CC-BY-4.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@enzet/roentgen 的下载量有多少?

根据 npm 官方下载统计,@enzet/roentgen 在 2026/10/14 – 2026/11/12 这 30 天内被下载 2,976 次,日均约 99 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@enzet/roentgen 还在维护吗?

最新版本 0.16.0 发布于 2026/06/10(5 个月前);至今共发布 8 个版本,其中过去 12 个月发布了 8 个;首次发布于 2025/12/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。