Skip to content

Commit

Permalink
doc:update readme
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Jul 2, 2022
1 parent 687405e commit d670ede
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ jobs:
pacman --noconfirm -S make gcc
cd depend
./build_ms.sh
- name: Build all
run: |
git fetch --tags --force
git describe --always --long --dirty --abbrev=10 --tags | ./tools/awk/awk.exe '{print \"\\\"\"$0\"\\\"\"}' > git_tag.inc
git describe --always --long --abbrev=10 --tags | ./tools/awk/awk.exe '{print \"\\\"\"$0\"\\\"\"}' > git_tag.inc
./tools/sed/sed.exe -i "s/git_tag.inc/git_tag.ci.inc/g" TTFviewer.pro
./tools/sed/sed.exe -i "s/QT_DIR=C:\/Qt\/Qt5.12.8\/5.12.8\/mingw73_32\/bin/QT_DIR=%Qt5_Dir%/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/QT_TOOLS_DIR=C:\/Qt\/Qt5.12.8\/Tools\/mingw730_32\/bin/QT_TOOLS_DIR=C:\/ProgramData\/Chocolatey\/lib\/mingw\/tools\/install\/mingw64\/x86_64-w64-mingw32\/bin/g" ./build_setup.bat
Expand Down
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
[![CI](https://github.com/QQxiaoming/TTFviewer/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/QQxiaoming/TTFviewer/actions/workflows/ci.yml)
[![CodeFactor](https://www.codefactor.io/repository/github/qqxiaoming/ttfviewer/badge)](https://www.codefactor.io/repository/github/qqxiaoming/ttfviewer)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/QQxiaoming/TTFviewer.svg)](https://github.com/QQxiaoming/TTFviewer/releases)
[![GitHub All Releases](https://img.shields.io/github/downloads/QQxiaoming/TTFviewer/total.svg)](https://github.com/QQxiaoming/TTFviewer/releases)
[![GitHub stars](https://img.shields.io/github/stars/QQxiaoming/TTFviewer.svg)](https://github.com/QQxiaoming/TTFviewer)

# TTFviewer

TTFviewer一款用于开发人员查看预览各种ttf字体/图标图像格式的小工具,其基于Qt,部分代码来源自项目: https://github.com/donbright/font_to_svghttps://github.com/QQxiaoming/YUVviewer ,支持windows/linux/macos,界面简单清晰,操作便携,主界面如下:
English | [简体中文](./README_zh_CN.md)

TTFviewer is a small tool for developers to view and preview various ttf font/icon image formats. It is based on Qt, and some of the code comes from the project: https://github.com/donbright/font_to_svg and https://github.com/QQxiaoming/YUVviewer , supports windows/linux/macos, the interface is simple and clear, and the operation is portable. The main interface is as follows:

(待补充)
![img0](./img/docimg0.png)

## 功能描述
## Feature

1. 主界面选择参数。
2. 点击打开文件或文件夹将进行图像数据解析并显示图像。
3. 图像显示界面中使用
- 滚轮放大缩小图像,
- 使用左键可拖动图像,
- 双击左键保存图像为png格式,
- 单击右键复位图像大小和位置,
- 单击中键显示图像原始大小。
1. Select parameters on the main interface.
2. Click Open File or Folder to parse the image data and display the image.
3. Used in the image display interface
- scroll wheel to zoom in and out of the image,
- use the left button to drag the image,
- Double click the left button to save the image as png format,
- Right click to reset image size and position,
- Middle click to display the original size of the image.

## 格式支持
## Format

目前支持格式包括:
Currently supported formats include:

ttf

## 编译说明
## Build

(待补充)
(TODO)
34 changes: 34 additions & 0 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[![CI](https://github.com/QQxiaoming/TTFviewer/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/QQxiaoming/TTFviewer/actions/workflows/ci.yml)
[![CodeFactor](https://www.codefactor.io/repository/github/qqxiaoming/ttfviewer/badge)](https://www.codefactor.io/repository/github/qqxiaoming/ttfviewer)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/QQxiaoming/TTFviewer.svg)](https://github.com/QQxiaoming/TTFviewer/releases)
[![GitHub All Releases](https://img.shields.io/github/downloads/QQxiaoming/TTFviewer/total.svg)](https://github.com/QQxiaoming/TTFviewer/releases)
[![GitHub stars](https://img.shields.io/github/stars/QQxiaoming/TTFviewer.svg)](https://github.com/QQxiaoming/TTFviewer)

# TTFviewer

[English](./README.md) | 简体中文

TTFviewer一款用于开发人员查看预览各种ttf字体/图标图像格式的小工具,其基于Qt,部分代码来源自项目: https://github.com/donbright/font_to_svghttps://github.com/QQxiaoming/YUVviewer ,支持windows/linux/macos,界面简单清晰,操作便携,主界面如下:

![img0](./img/docimg0.png)

## 功能描述

1. 主界面选择参数。
2. 点击打开文件或文件夹将进行图像数据解析并显示图像。
3. 图像显示界面中使用
- 滚轮放大缩小图像,
- 使用左键可拖动图像,
- 双击左键保存图像为png格式,
- 单击右键复位图像大小和位置,
- 单击中键显示图像原始大小。

## 格式支持

目前支持格式包括:

ttf

## 编译说明

(待补充)
2 changes: 1 addition & 1 deletion TTFviewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ win32:{
INCLUDEPATH += $${FREETPE2_DIR}\include\freetype2 \
$${FREETPE2_DIR}\include

LIBS += $${FREETPE2_DIR}\lib\libfreetype.dll.a
LIBS += $${FREETPE2_DIR}\lib\libfreetype.a

VERSION = $${YVYVIEWER_VERSION}.000
QMAKE_TARGET_PRODUCT = "TTFviewer"
Expand Down
1 change: 1 addition & 0 deletions depend/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ cd $SHELL_FOLDER/freetype-2.3.5
./configure --prefix=/usr/local/ttfviewer --disable-shared --without-zlib
make -j4
make install
rm -rf $SHELL_FOLDER/freetype-2.3.5
1 change: 1 addition & 0 deletions depend/build_ms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ cd $SHELL_FOLDER/freetype-2.3.5
--without-zlib
make -j4
make install
rm -rf $SHELL_FOLDER/freetype-2.3.5
Binary file modified img/docimg0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/TTFviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ bool TTFviewer::updateConfig(void)
QMessageBox::critical(this, "Error", "frameSize invalid!!", QMessageBox::Ok);
return false;
}

}

bool TTFviewer::imgView(QStringList openfile_list)
Expand Down
1 change: 0 additions & 1 deletion src/font_to_svg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class ttf_file
debug << "\nFree library. error code: " << error;
debug << "\n-->\n";
}

};


Expand Down

0 comments on commit d670ede

Please sign in to comment.