Skip to content

Commit f2b4895

Browse files
committed
Revert "给出测试内容"
This reverts commit b55b9d4.
1 parent b55b9d4 commit f2b4895

1 file changed

Lines changed: 8 additions & 18 deletions

File tree

  • Workbench/Wmf/KawkaywecaljalKayjaybelfuber

Workbench/Wmf/KawkaywecaljalKayjaybelfuber/Program.cs

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

9696
for (var i = 0; i < wmfDocument.Records.Count; i++)
9797
{
98-
if (i == 27)
99-
{
100-
101-
}
102-
10398
var wmfDocumentRecord = wmfDocument.Records[i];
10499
switch (wmfDocumentRecord)
105100
{
@@ -243,11 +238,6 @@ Encoding CharacterSetToEncoding(CharacterSet characterSet)
243238
var stringBuffer = binaryReader.ReadBytes(stringLength);
244239
var text = currentEncoding.GetString(stringBuffer);
245240

246-
if (text == "kk")
247-
{
248-
249-
}
250-
251241
// 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.
252242
//Debug.Assert(st == unknownRecord.RecordSize);
253243
var dxLength = unknownRecord.Data.Length - st;
@@ -265,14 +255,14 @@ Encoding CharacterSetToEncoding(CharacterSet characterSet)
265255
}
266256
else
267257
{
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)];
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)];
276266
for (var t = 0; t < dxArray.Length; t++)
277267
{
278268
dxArray[t] = binaryReader.ReadUInt16();

0 commit comments

Comments
 (0)