Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
234f3e0
Port of CSS engine from PeachPDF (ExCSS-based)
jhaygood86 Jul 16, 2026
228e539
Fix CalcSerializer
jhaygood86 Jul 16, 2026
2b081f7
Replace custom CSS with standards
jhaygood86 Jul 17, 2026
5c53c38
Fixes <br>
jhaygood86 Jul 17, 2026
a70acb2
CSS engine: sync enumerations, tokens and leaf value types
jhaygood86 Jul 25, 2026
1398a3f
CSS engine: sync CSS Color 4/5 color science
jhaygood86 Jul 25, 2026
ee70b9d
CSS engine: sync @property and the calc() time/resolution leaves
jhaygood86 Jul 25, 2026
81f66ef
CSS engine: sync CSS logical box-model properties
jhaygood86 Jul 25, 2026
46c6131
CSS engine: sync clip-path, aspect-ratio and box-shadow
jhaygood86 Jul 25, 2026
3c5bd91
CSS engine: sync value converter infrastructure and grid grammars
jhaygood86 Jul 25, 2026
d1a3975
CSS engine: sync CSS Grid properties and factory registrations
jhaygood86 Jul 25, 2026
62fc867
CSS engine: sync @layer and the user-preference media features
jhaygood86 Jul 25, 2026
4e9c10b
CSS engine: sync font-palette, @font-palette-values and palette-mix()
jhaygood86 Jul 25, 2026
075b257
CSS engine: sync CSS Nesting, :where() and the parser conformance fixes
jhaygood86 Jul 25, 2026
fe4f4bc
CSS engine: sync trimming/AOT hardening and remaining property updates
jhaygood86 Jul 25, 2026
8318cff
Remove upstream-project references from source comments
jhaygood86 Jul 25, 2026
2bbd92f
CssData: index nested and layered rules; resolve colours through the …
jhaygood86 Jul 25, 2026
4adbad2
Evaluate @media against the platform, via two new adapter properties
jhaygood86 Jul 25, 2026
6ec6cbd
Re-evaluate @media when the viewport changes
jhaygood86 Jul 25, 2026
2c56875
Remove the -peachpdf-pdf-tag-type property
jhaygood86 Jul 25, 2026
850aab4
Re-evaluate @media when the system colour scheme changes
jhaygood86 Jul 25, 2026
7cea1c5
Fix regressions from the CSS engine port and update stale baselines
jhaygood86 Aug 9, 2026
a80adb3
Fix font-family quote/list resolution and list-style-type: hebrew
jhaygood86 Aug 9, 2026
6467f41
Fix invalid font shorthand in Tables demo sample
jhaygood86 Aug 9, 2026
f06a32b
Fix 1em to resolve against font-size, not line-height metric
jhaygood86 Aug 9, 2026
88ba108
Port CSS float/clear layout from PeachPDF, fix box-sizing height/widt…
jhaygood86 Aug 9, 2026
f0a190e
Convert resource loading and the rendering pipeline to async, porting…
jhaygood86 Aug 9, 2026
21ff7fc
Port CSS @font-face support from PeachPDF and switch demo fonts to bu…
jhaygood86 Aug 10, 2026
4a186f9
Make the prefers-color-scheme regression test independent of the host…
jhaygood86 Aug 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Source/Demo/Common/DemoUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public static string GetStylesheet(string src)
a:link { text-decoration: none; }
a:hover { text-decoration: underline; }
.gray { color:gray; }
.example { background-color:#efefef; corner-radius:5px; padding:0.5em; }
.whitehole { background-color:white; corner-radius:10px; padding:15px; }
.example { background-color:#efefef; border-radius:5px; padding:0.5em; }
.whitehole { background-color:white; border-radius:10px; padding:15px; }
.caption { font-size: 1.1em }
.comment { color: green; margin-bottom: 5px; margin-left: 3px; }
.comment2 { color: green; }";
Expand Down
30 changes: 30 additions & 0 deletions Source/Demo/Common/HtmlRenderer.Demo.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,34 @@
<EmbeddedResource Include="Resources\pdf.png" />
<EmbeddedResource Include="Resources\stopwatch.png" />
<EmbeddedResource Include="Resources\image32.png" />
<EmbeddedResource Include="Resources\Fonts\LiberationSans-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationSans-Bold.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationSans-Italic.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationSans-BoldItalic.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationSerif-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationSerif-Bold.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationSerif-Italic.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationSerif-BoldItalic.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationMono-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationMono-Bold.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationMono-Italic.ttf" />
<EmbeddedResource Include="Resources\Fonts\LiberationMono-BoldItalic.ttf" />
<EmbeddedResource Include="Resources\Fonts\NotoSans-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\NotoSans-Bold.ttf" />
<EmbeddedResource Include="Resources\Fonts\NotoSans-Italic.ttf" />
<EmbeddedResource Include="Resources\Fonts\NotoSans-BoldItalic.ttf" />
<EmbeddedResource Include="Resources\Fonts\NotoSerif-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\NotoSerif-Bold.ttf" />
<EmbeddedResource Include="Resources\Fonts\NotoSerif-Italic.ttf" />
<EmbeddedResource Include="Resources\Fonts\NotoSerif-BoldItalic.ttf" />
<EmbeddedResource Include="Resources\Fonts\Pacifico-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\DancingScript-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\Caveat-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\IndieFlower-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\ComicNeue-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\ComicNeue-Bold.ttf" />
<EmbeddedResource Include="Resources\Fonts\ComicNeue-Italic.ttf" />
<EmbeddedResource Include="Resources\Fonts\ComicNeue-BoldItalic.ttf" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="TestSamples\01.Header.htm" />
Expand All @@ -66,12 +94,14 @@
<EmbeddedResource Include="TestSamples\20.Fonts decorations.htm" />
<EmbeddedResource Include="TestSamples\21.Bullets.htm" />
<EmbeddedResource Include="TestSamples\22.RTL.htm" />
<EmbeddedResource Include="TestSamples\23.Media queries and color scheme.htm" />
<EmbeddedResource Include="TestSamples\30.Misc.htm" />
<EmbeddedResource Include="TestSamples\31.ACID 1.htm" />
<EmbeddedResource Include="TestSamples\32.Image in css content.htm" />
<EmbeddedResource Include="TestSamples\33.Fixed position.htm" />
<EmbeddedResource Include="TestSamples\34.Breaking pages 1 - Paragraphs.htm" />
<EmbeddedResource Include="TestSamples\35.Breaking pages 2 - Tables.htm" />
<EmbeddedResource Include="TestSamples\36.Float wrap.htm" />
<EmbeddedResource Include="Samples\00.Intro.htm" />
<EmbeddedResource Include="Samples\01.History.htm" />
<EmbeddedResource Include="Samples\02.Text.htm" />
Expand Down
21 changes: 21 additions & 0 deletions Source/Demo/Common/Resources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ public static byte[] CustomFont
}
}

/// <summary>
/// Reads one of the bundled <c>Resources\Fonts\*.ttf</c> demo fonts (Liberation/Noto/whimsical -
/// see <c>Resources\Fonts\README.md</c> for the full list and provenance) by file name, e.g.
/// <c>GetFontBytes("LiberationSans-Regular.ttf")</c>.
/// </summary>
public static byte[] GetFontBytes(string fileName)
{
var stream = GetManifestResourceStream("Fonts." + fileName);

var buffer = new byte[16 * 1024];
using (var ms = new MemoryStream())
{
int read;
while ((read = stream.Read(buffer, 0, buffer.Length)) > 0)
{
ms.Write(buffer, 0, read);
}
return ms.ToArray();
}
}

public static Stream Comment16
{
get { return GetManifestResourceStream("comment16.gif"); }
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
93 changes: 93 additions & 0 deletions Source/Demo/Common/Resources/Fonts/OFL-Caveat.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2014 The Caveat Project Authors (https://github.com/googlefonts/caveat)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
93 changes: 93 additions & 0 deletions Source/Demo/Common/Resources/Fonts/OFL-ComicNeue.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2014 The Comic Neue Project Authors (https://github.com/crozynski/comicneue)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
93 changes: 93 additions & 0 deletions Source/Demo/Common/Resources/Fonts/OFL-DancingScript.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2016 The Dancing Script Project Authors (https://github.com/googlefonts/DancingScript), with Reserved Font Name 'Dancing Script'.

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Loading