技能潮 SkillTide 提交收录
官方说明开源项目7 天前
ALE7506/text-metrics-analyzer

ALE7506/text-metrics-analyzer

PretextPlugin 2026 – Deep MCP Tools for DOM-Free Text Layout & Measurement
在 GitHub 查看 ↗直链 · 无中转页
★ 数取值
2 ★ · ALE7506/text-metrics-analyzer · 取自该仓库的 GitHub 页面 · (2026-10-16 20:00:20 核对)
来源明细
从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
收录与活跃
收录于 2026-10-10 · 最近见到 2026-10-10 · 共见到 2 次 · 被 1 个来源列出
评分构成
综合分 103 · 2 ★ · 1 个来源 · repo
安装
pip install textforge-ai
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是 pip install textforge-ai。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。
它适合谁 / 用来做什么?
我们把它归在这些标签下: 开源项目。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 ALE7506/text-metrics-analyzer;我们收录于 2026-10-10;最近见到 2026-10-10。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

TextForge AI: Intelligent Text Measurement & Layout Control for Large Language M

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

Overview
TextForge AI is a powerful pretext plugin and knowledge layer that equips Claude, GPT-4, and other large language models with deep, DOM-free text measurement, layout intelligence, and precise spatial reasoning. Inspired by the PretextPlugin ecosystem, TextForge AI reimagines how AI models understand and manipulate text geometry without relying on browser-based Document Object Models. This repository provides a complete toolkit of skills, MCP (Model Context Protocol) tools, and reference documentation for developers building AI-native applications that demand pixel-perfect text layout, advanced typography control, and robust text measurement capabilities in zero-browser environments.
Think of TextForge AI as the architect's blueprint for language models — where every character, line, and paragraph is measured with surgical precision, allowing AI to reason about text in physical space rather than abstract tokens. This is not just another plugin; it is a cognitive bridge between linguistic understanding and visual layout design.
Why TextForge AI Matters
Imagine asking an AI model to write a headline that fits a 300-pixel container or to generate a table with perfect column alignment. Without TextForge AI, the model operates blindly, guessing at dimensions and layouts. This plugin transforms the AI into a text engineer, capable of calculating exact widths, heights, and layout constraints in real-time. For developers, this means the end of "close enough" formatting and the beginning of AI-generated content that looks like a professional designer crafted it.
Key Features
1. DOM-Free Text Measurement Engine
- **Zero-browser dependency** — measure text strings using canvas-like rendering algorithms
- **Character-level bounding box calculation** with sub-pixel accuracy
- **Unicode-aware measurement** for CJK characters, Arabic scripts, and emoji sequences
- **Variable font support** including weight, width, and optical size axes
2. MCP Tools for Spatial Text Reasoning
- **TextWidthEstimator** — Calculate exact pixel width of any string given font properties
- **LayoutOptimizer** — Distribute text across containers with smart line breaking
- **OverlapDetector** — Identify and resolve text collisions in complex layouts
- **MultiFontComparator** — Compare rendering differences across font families
3. AI-Native API Integration
- **OpenAI API compatibility** — Works seamlessly with GPT-4o, GPT-4 Turbo
- **Claude API integration** — Optimized for Claude's function calling and tool use
- **Custom skill definitions** — Teach any LLM to think in terms of text geometry
4. Responsive Layout Intelligence
- **Adaptive typing** — Auto-adjusts font sizes based on container dimensions
- **Breakpoint-aware text generation** — Produce content that fits mobile, tablet, and desktop
- **Dynamic hyphenation** — Language-specific word breaking for clean text flow
5. Multilingual Support
- 120+ language scripts supported
- Right-to-left (RTL) and bidirectional text measurement
- Vertical writing mode for Japanese and Chinese
Mermaid Diagram: TextForge AI Architecture
Getting Started
Prerequisites
- Python 3.9+ or Node.js 18+
- An active OpenAI or Claude API key
- Familiarity with LLM function calling patterns
Installation via NPM
Installation via Pip
Quick Start — Python
Example Profile Configuration
Configure TextForge AI for your specific LLM environment. Below is a sample profile that activates all measurement and layout tools:
Example Console Invocation
Demonstrate TextForge AI capabilities directly from your terminal:
Emoji OS Compatibility Table
来源
github · https://github.com/ALE7506/text-metrics-analyzer
按领域浏览
开源项目
Traction
2 ★
收录于
7 天前

更多开源项目

查看开源项目全部 731 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引