Skip to content

Commit

Permalink
自定义字体。
Browse files Browse the repository at this point in the history
  • Loading branch information
tengge1 committed Dec 29, 2019
1 parent 1f814da commit 77c9a14
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ __pycache__
/ShadowEditor.Web/Upload3
/test/TensorEditor/build
/ShadowEditor.Web/backup
/ShadowEditor.Web/assets/fonts/custom
3 changes: 2 additions & 1 deletion ShadowEditor.Web/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -970,5 +970,6 @@
"Create Font": "创建字体",
"Font File": "字体文件",
"Reverse direction": "反转方向",
"Character set": "字符集"
"Character set": "字符集",
".ttc to .ttf": ".ttc转.ttf"
}
11 changes: 10 additions & 1 deletion ShadowEditor.Web/src/editor/menu/window/CreateFontWindow.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './css/CreateFontWindow.css';
import { Window, Content, Buttons, Button, Label, Input, CheckBox, Form, FormControl } from '../../../third_party';
import { Window, Content, Buttons, Button, Label, Input, CheckBox, Form, FormControl, LinkButton } from '../../../third_party';

/**
* 创建字体窗口
Expand All @@ -15,6 +15,7 @@ class CreateFontWindow extends React.Component {
};

this.handleChange = this.handleChange.bind(this);
this.handleConvertFontType = this.handleConvertFontType.bind(this);
this.handleOK = this.handleOK.bind(this);
this.handleClose = this.handleClose.bind(this);
}
Expand Down Expand Up @@ -53,6 +54,10 @@ class CreateFontWindow extends React.Component {
onChange={this.handleChange}
/>
</FormControl>
<FormControl>
<Label>{_t('.ttc to .ttf')}</Label>
<LinkButton onClick={this.handleConvertFontType}>{'https://transfonter.org/ttc-unpack'}</LinkButton>
</FormControl>
</Form>
</Content>
<Buttons>
Expand All @@ -73,6 +78,10 @@ class CreateFontWindow extends React.Component {
});
}

handleConvertFontType() {
window.open('https://transfonter.org/ttc-unpack', '_blank');
}

handleOK() {

}
Expand Down

0 comments on commit 77c9a14

Please sign in to comment.