diff --git a/css/common/bootstrap.less b/css/common/bootstrap.less index 4fa2995..f413af8 100644 --- a/css/common/bootstrap.less +++ b/css/common/bootstrap.less @@ -4,6 +4,10 @@ .modal-dialog { margin-top: 100px; + + hr { + margin-top: 0; + } } .modal-header { diff --git a/css/common/dialog.less b/css/common/dialog.less new file mode 100644 index 0000000..cd81679 --- /dev/null +++ b/css/common/dialog.less @@ -0,0 +1,28 @@ + + +.setting-metrics { + + .modal-dialog { + width: 800px; + } + + .form-inline .form-group { + width: 22%; + } + + .panose-inline { + margin-bottom: -40px; + .input-group { + width: 100%; + } + .input-group-addon { + text-align: left; + } + .form-group { + width: 29%; + } + } + +} + + diff --git a/css/main.less b/css/main.less index c761c12..2b62734 100644 --- a/css/main.less +++ b/css/main.less @@ -4,4 +4,5 @@ @import './common/project.less'; @import './common/glyf-list.less'; @import './common/editor.less'; +@import './common/dialog.less'; @import './common/import-pic.less'; diff --git a/src/fonteditor/dialog/setting-metrics.js b/src/fonteditor/dialog/setting-metrics.js index 00bde88..9bc1a09 100644 --- a/src/fonteditor/dialog/setting-metrics.js +++ b/src/fonteditor/dialog/setting-metrics.js @@ -10,44 +10,50 @@ define( function (require) { var tpl = require('../template/dialog/setting-metrics.tpl'); + var string = require('common/string'); var program = require('../widget/program'); var weightClass = require('ttf/enum/weightClass'); var widthClass = require('ttf/enum/widthClass'); - var panose = [ - 'bFamilyType', 'bSerifStyle', 'bWeight', 'bProportion', 'bContrast', - 'bStrokeVariation', 'bArmStyle', 'bLetterform', 'bMidline', 'bXHeight' - ]; + var panose = require('ttf/enum/panose'); return require('./setting').derive({ title: '字体度量', + style: 'setting-metrics', + getTpl: function () { - return tpl; + // width and weight + var optionsHolder = {}; + + optionsHolder.weightOptions = Object.keys(weightClass).map(function (key) { + return ''; + }).join(''); + + optionsHolder.widthOptions = Object.keys(widthClass).map(function (key) { + return ''; + }).join(''); + + optionsHolder.panoseOptions = Object.keys(panose).map(function (key, index) { + return '' + + '