개정판 24c5e56c
- final pdf Font 추가
- Markus navi 속도 최적화 Key input 최적화
Change-Id: I7f2cf1933e86017d7b1df9ef4bd3048a8e80a653
MarkupToPDF/Controls/Text/TextControl.cs | ||
---|---|---|
12 | 12 |
using System.Windows.Controls; |
13 | 13 |
using System.Windows.Media; |
14 | 14 |
using System.Windows.Shapes; |
15 |
using Markus.Fonts; |
|
15 | 16 |
|
16 | 17 |
namespace MarkupToPDF.Controls.Text |
17 | 18 |
{ |
... | ... | |
319 | 320 |
public void Dispose() |
320 | 321 |
{ |
321 | 322 |
//GC.Collect(); |
322 |
//GC.SuppressFinalize(this); |
|
323 |
////GC.SuppressFinalize(this);
|
|
323 | 324 |
this.Base_Border = null; |
324 | 325 |
this.Base_Canvas = null; |
325 | 326 |
this.Base_Grid = null; |
... | ... | |
502 | 503 |
"TextStyle", typeof(FontStyle), typeof(TextControl), new PropertyMetadata(FontStyles.Normal)); |
503 | 504 |
|
504 | 505 |
public static readonly DependencyProperty TextFamilyProperty = DependencyProperty.Register( |
505 |
"TextFamily", typeof(FontFamily), typeof(TextControl), new PropertyMetadata(new FontFamily("Arial"))); |
|
506 |
"TextFamily", typeof(FontFamily), typeof(TextControl), |
|
507 |
new PropertyMetadata(new PropertyChangedCallback(TextFamilyPropertyChanged))); |
|
506 | 508 |
|
507 | 509 |
public static readonly DependencyProperty TextWeightProperty = DependencyProperty.Register( |
508 | 510 |
"TextWeight", typeof(FontWeight), typeof(TextControl), new PropertyMetadata(FontWeights.Normal)); |
... | ... | |
1037 | 1039 |
#endregion |
1038 | 1040 |
|
1039 | 1041 |
#region CallBack Method |
1042 |
|
|
1043 |
private static void TextFamilyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|
1044 |
{ |
|
1045 |
var instance = (TextControl)d; |
|
1046 |
|
|
1047 |
instance.SetFontFamily(e.NewValue as FontFamily); |
|
1048 |
} |
|
1049 |
|
|
1040 | 1050 |
public static void SetPathGeometryChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) |
1041 | 1051 |
{ |
1042 | 1052 |
var instance = (TextControl)sender; |
... | ... | |
1172 | 1182 |
{ |
1173 | 1183 |
if (PropertyChanged != null) |
1174 | 1184 |
PropertyChanged(this, new PropertyChangedEventArgs(propName)); |
1185 |
|
|
1186 |
if (propName == "UnderLine" && Base_TextBlock != null) |
|
1187 |
{ |
|
1188 |
Base_TextBlock.TextDecorations = UnderLine; |
|
1189 |
//(sender as TextControl).Base_TextBlock.TextDecorations = (sender as TextControl).UnderLine; |
|
1190 |
} |
|
1175 | 1191 |
} |
1176 | 1192 |
|
1177 | 1193 |
/// <summary> |
... | ... | |
1248 | 1264 |
STemp.Name = this.GetType().Name.ToString(); |
1249 | 1265 |
STemp.fontConfig = new List<string>() |
1250 | 1266 |
{ |
1251 |
this.TextFamily.ToString(),
|
|
1267 |
this.TextFamily.FontName(),
|
|
1252 | 1268 |
this.TextStyle.ToString(), |
1253 | 1269 |
this.TextWeight.ToString(), |
1254 | 1270 |
}; |
... | ... | |
1298 | 1314 |
PointSet = s.PointSet, |
1299 | 1315 |
Opacity = s.Opac, |
1300 | 1316 |
|
1301 |
TextFamily = new FontFamily(s.fontConfig[0]),
|
|
1317 |
TextFamily = Markus.Fonts.FontHelper.GetFontFamily(s.fontConfig[0]),
|
|
1302 | 1318 |
//인구 추가(2018.04.17) |
1303 | 1319 |
TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]), |
1304 | 1320 |
TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]), |
내보내기 Unified diff