Skip to content

Instantly share code, notes, and snippets.

View u1f992's full-sized avatar

Koutaro Mukai u1f992

View GitHub Profile

Chromium color(srgb ...) → PDF オペレータ 変換の調査

分析対象のコードバージョン

リポジトリ コミットハッシュ 日時
Chromium a2652c6fc5817d5cc643c3935e1363ddc48abb6e 2025-12-24 04:32:10 -0800
Skia (third_party/skia) 3544942c9d424d37d82d756d6dbbbc04327e8dbb 2025-12-24 02:08:10 -0800

観察された挙動

<style> @page { size: A5; } </style>
<style> @page { size: A4; margin-block: 15mm; } :root { counter-reset: section; }
# autotrace.dockerfile
# Copyright (C) 2025 Koutaro Mukai
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@u1f992
u1f992 / example.html
Last active April 12, 2025 03:08
float: bottom;は脚注エリアを考慮した本文領域の下部に表示されることを確認するデモ
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
@page {
size: A5;
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>Vivliostyle CLI+rehypeプラグインによる原稿の前処理</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
type="text/css"
href="themes/packages/css/style.css"
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>CSS組版完全に理解した</title>
<style>
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&display=swap");
:root {
font-family: "Noto Sans JP";
@u1f992
u1f992 / .js
Created December 3, 2024 14:17
/**
* https://drafts.csswg.org/css-color-5/#device-cmyk
*
* @param {string} input
* @returns {{c:number,m:number,y:number,k:number,a:number}|null}
*/
function parseDeviceCmyk(input) {
/**
* https://www.w3.org/TR/css-syntax/#newline
*/
@u1f992
u1f992 / .md
Last active June 1, 2024 13:00

Qingpiの製造方法メモ

Pokémon Past Generation Advent Calendar 2023、185日目の記事です。売り切れ御礼の3DS LL合意なし秘密さわさわ基板Qingpiの製造についてかんたんに書きます。

QingpiはGPLv3で公開されています。ライセンスに従って自由に製造していただいて構いません。なおNew 3DS LLに対応する新作を開発中です。よほどでなければ気長にお待ちいただくのがよいでしょう。3DS LLに対応するかは未定です。

PCB

Qingpiのプリント基板は、JLCPCBでの製造を前提にKiCadで開発されています。もろもろの具体的な手順は他所のサイトを参考にしてください。

import fs from "node:fs";
import vm from "node:vm";
import jsdom from "jsdom";
type PrismContext = vm.Context & { PrismContext: never };
type PrismPlugin = "autolinker"
| "autoloader"
| "command-line"
| "copy-to-clipboard"