Skip to content

Commit b55b9d4

Browse files
committed
给出测试内容
1 parent d72beb0 commit b55b9d4

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

  • Workbench/Wmf/KawkaywecaljalKayjaybelfuber

Workbench/Wmf/KawkaywecaljalKayjaybelfuber/Program.cs

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ Encoding CharacterSetToEncoding(CharacterSet characterSet)
9595

9696
for (var i = 0; i < wmfDocument.Records.Count; i++)
9797
{
98+
if (i == 27)
99+
{
100+
101+
}
102+
98103
var wmfDocumentRecord = wmfDocument.Records[i];
99104
switch (wmfDocumentRecord)
100105
{
@@ -238,6 +243,11 @@ Encoding CharacterSetToEncoding(CharacterSet characterSet)
238243
var stringBuffer = binaryReader.ReadBytes(stringLength);
239244
var text = currentEncoding.GetString(stringBuffer);
240245

246+
if (text == "kk")
247+
{
248+
249+
}
250+
241251
// Dx (variable): An optional array of 16-bit signed integers that indicate the distance between origins of adjacent character cells. For example, Dx[i] logical units separate the origins of character cell i and character cell i + 1. If this field is present, there MUST be the same number of values as there are characters in the string.
242252
//Debug.Assert(st == unknownRecord.RecordSize);
243253
var dxLength = unknownRecord.Data.Length - st;
@@ -255,14 +265,14 @@ Encoding CharacterSetToEncoding(CharacterSet characterSet)
255265
}
256266
else
257267
{
258-
// 如果这里计算出来不是偶数,则首个需要跳过。这是经过测试验证的。但没有相关说明内容。且跳过的 byte 是有内容的
259-
if (dxLength > ((dxLength / sizeof(UInt16)) * sizeof(UInt16)))
260-
{
261-
var r = binaryReader.ReadByte();
262-
_ = r;
263-
}
264-
265-
UInt16[] dxArray = new UInt16[dxLength / sizeof(UInt16)];
268+
//// 如果这里计算出来不是偶数,则首个需要跳过。这是经过测试验证的。但没有相关说明内容。且跳过的 byte 是有内容的
269+
if (dxLength > ((dxLength / sizeof(UInt16)) * sizeof(UInt16)))
270+
{
271+
var r = binaryReader.ReadByte();
272+
_ = r;
273+
}
274+
275+
UInt16[] dxArray = new UInt16[dxLength / sizeof(UInt16)];
266276
for (var t = 0; t < dxArray.Length; t++)
267277
{
268278
dxArray[t] = binaryReader.ReadUInt16();

0 commit comments

Comments
 (0)