private void btnRefreshPreview_Click(object sender, EventArgs e) { Bitmap bmp = null; List <UInt16> chars = new List <UInt16>() { '示', '示', '示', ' ', '例', '例', '例', ' ', '文', '文', '文', ' ', '字', '字', '字', ' ' }; if (FontGen.Generate( chars, (int)editOffsetX.Value, (int)editCharWidth.Value * 2 + 1, (int)editCharHeight.Value * 2 + 1, (int)editCharWidth.Value, (int)editCharHeight.Value, _fontSel, true, out bmp, null)) { picturePreview.Image = bmp; } }
private void btnRefreshPreview_Click(object sender, EventArgs e) { Bitmap bmp = null; List <char> chars = new List <char>(); for (int i = 0; i < editExample.Text.Length; i++) { chars.Add(editExample.Text[i]); } if (FontGen.Generate( chars, radRenderGdi.Checked, getTextRenderingHint(), (int)editCharHeight.Value * 2 + 10, (int)editCharHeight.Value * 2 + 10, (int)editCharHeight.Value, (int)editCharHeight.Value, _fontSel, true, out bmp, null, null)) { picturePreview.Image = bmp; } }
private void btnSave_Click(object sender, EventArgs e) { if (_charset == null || _charset.Count == 0) { MessageBox.Show("没有选择字符集"); return; } if (saveFolderBrowser.ShowDialog() == DialogResult.OK) { Bitmap bmp = null; FontGen.Generate(_charset, (int)editOffsetX.Value, (int)editTotWidth.Value, (int)editTotHeight.Value, (int)editCharWidth.Value, (int)editCharHeight.Value, _fontSel, false, out bmp, saveFolderBrowser.SelectedPath); MessageBox.Show("已保存"); } }
private void btnSave_Click(object sender, EventArgs e) { if (_charset == null || _charset.Count == 0) { MessageBox.Show("没有选择字符集"); return; } if (saveFolderBrowser.ShowDialog() == DialogResult.OK) { Bitmap bmp = null; FontGen.Generate(_charset, radRenderGdi.Checked, getTextRenderingHint(), (int)editTotWidth.Value, (int)editTotHeight.Value, 0, (int)editCharHeight.Value, _fontSel, false, out bmp, saveFolderBrowser.SelectedPath, _refFileName); MessageBox.Show("已保存"); } }