npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-chinese-name-comparator

v0.1.5

Published

n8n node to compare Chinese names rendered with different fonts

Downloads

38

Readme

n8n-nodes-chinese-name-comparator

This is an n8n community node that allows you to compare Chinese names rendered with different fonts using Gemini LLM for visual analysis.

n8n is a fair-code licensed workflow automation platform.

Installation
Operations
Compatibility
Usage
Workflow Example
Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

Manual Installation

  1. Go to your n8n installation directory
  2. Navigate to custom folder (create if it doesn't exist)
  3. Clone or copy this repository
  4. Run npm install in the node directory
  5. Run npm run build
  6. Restart n8n

NPM Installation

npm install n8n-nodes-chinese-name-comparator

Operations

This node supports the following operation:

Render and Compare Names

Renders two Chinese names with different fonts and prepares them for comparison with Gemini LLM.

Input Parameters:

  • Name 1: First Chinese name to compare
  • Name 2: Second Chinese name to compare
  • Font 1: Font file for the first name (TTF or OTF format as base64)
  • Font 2: Font file for the second name (TTF or OTF format as base64)
  • Font 1 Name: Name to use for font 1 registration (default: "font1")
  • Font 2 Name: Name to use for font 2 registration (default: "font2")

Output:

  • name1: The first name provided
  • name2: The second name provided
  • prompt: Formatted prompt for Gemini LLM
  • image1: Base64-encoded PNG image of name1
  • image2: Base64-encoded PNG image of name2
  • geminiPrompt: Prompt ready for Gemini LLM node
  • geminiImages: Array of base64 images for Gemini LLM
  • Binary data: image1 and image2 as PNG files

Compatibility

  • Minimum n8n version: 1.0.0
  • Requires canvas module support
  • Tested with n8n version: 1.0.0

Usage

Basic Workflow Setup

  1. Chinese Name Font Comparator Node

    • Add this node to your workflow
    • Enter the two Chinese names you want to compare
    • Provide font files as base64 strings (or use a previous node to read them)
    • Execute the node
  2. Gemini LLM Node (connect to the output)

    • Use the geminiPrompt field for the prompt
    • Use the geminiImages field for the images
    • The Gemini LLM will analyze the visual differences
  3. Process Results

    • Add additional nodes to handle the Gemini response

Workflow Example

Here's a complete example workflow:

1. Chinese Name Font Comparator Node

Input:
- Name 1: "張偉"
- Name 2: "张伟"
- Font 1: [base64 of traditional Chinese font]
- Font 2: [base64 of simplified Chinese font]

2. Gemini LLM Node

Input:
- Prompt: {{$json.geminiPrompt}}
- Images: {{$json.geminiImages}}

3. IF Node

Check Gemini's confidence level and determine if names match

4. Send Notification

Email or Slack notification with results

Handling Font Files

Since font files need to be provided as base64 strings, you have several options:

Option 1: HTTP Request Node

// Fetch font from URL
// The HTTP Request node will provide binary data
// Connect to a Function node to convert to base64

Option 2: Function Node

// Convert binary font data to base64
const fontBuffer = $binary.data;
const base64Font = fontBuffer.toString('base64');
return { font1: base64Font };

Option 3: Read Binary File Node

// If fonts are local files
// Use Read Binary File node
// Then convert to base64 using Function node

Technical Details

This node uses:

  • canvas library for rendering Chinese characters with custom fonts
  • Temporary file storage for font registration
  • Base64 encoding for font input and image output
  • Integration with Gemini LLM for visual comparison

The node creates 400x200px PNG images with:

  • White background
  • Black text
  • 48px font size
  • Centered text alignment

Example Use Cases

  1. Traditional vs Simplified Chinese: Compare traditional and simplified versions of the same name
  2. Font Compatibility: Check if different fonts render names correctly
  3. Name Verification: Verify if two names are the same despite different fonts
  4. Document Processing: Validate names extracted from documents with different fonts

Resources

License

MIT