Truly independent web browser
Go to file
Nico Weber bd74447dba LibPDF: Initial support for drawing CFF-based Type0 fonts
Together with the already-merged #23122, #23128, #23135, #23136, #23162,
and #23167, #23179, #23190, #23194 this adds initial support for
rendering some CFF-based Type0 fonts :^)

There's a long list of things that still need improving after this:

* A small number of CFF programs contain the charstring command 0,
  which is invalid. Currently, this makes us reject the whole font.

* Type1FontProgram::rasterize_glyph() is name-based. For CID-based
  fonts, we want a version that takes CIDs (character IDs) instead.
  For now, I'm printing the CID to a string and using that, yuck.
  (I looked into doing this nicely. I do want to do that, but I
  need to read up on how the `seac` type1 charstring command uses
  character names to identify parts of an accented character.
  Also, it looks like `seac`'s accented character handling moved
  over to `endchar` in type2 charstring commands (i.e. in CFF data),
  and it looks like we don't implement that at all. So I need to do
  more reading first, and I didn't want to block this on that.)

* The name for the first string in name-based CFF fonts looks wrong;
  added a FIXME for that for now.

* This supports the named Identity-H cmap only for now. Identity-H
  maps UTF16-BE values to glyph IDs with the idenity function, and
  assumes it's horizontal text. Other named cmaps in my test files are
  UniJIS-UCS2-H, UniCNS-UCS2-H, Identity-V, UniGB-UCS2-H, UniKS-UCS2-H.
  (There are also 2 files using the stream-based cmaps instead of the
  name-based ones.)

  * In particular, we can't draw vertical text (`-V`) yet

* Passing in the encoding to CFF::create() is awkward (it's nullptr
  for CID-keyed fonts), and it's also not necessary since
  `Type1Font::draw_glyph()` already does the "take encoding from PDF,
  and only from font if the PDF doesn't store one" dance.

* This doesn't cache glyphs but re-rasterizes them each time. Easy
  to add, but maybe I want to look at rotation first. And things
  don't feel glacial as-is.

* Type0Font::draw_glyph() is pretty similar to second half of
  Type1Font::draw_glyph()
2024-02-16 12:41:10 -05:00
.devcontainer Meta: Switch to clang-format-16 as the standard formatter 2023-07-08 10:32:56 +01:00
.github CI: Bump mymindstorm/setup-emsdk from 13 to 14 2024-02-08 07:19:32 -07:00
AK AK+LibXML+JSSpecCompiler: Move LineTrackingLexer to AK 2024-02-16 15:26:43 +01:00
Base Base: Improve 3DFileViewer Icons 2024-02-08 08:08:25 -07:00
Documentation Documentation: Add 'python3-packaging' to additional dependency list 2024-02-07 15:04:21 +01:00
Kernel Kernel: Propagate errors with TRY() where possible 2024-02-14 17:46:06 -05:00
Ladybird WebDriver: Add commandline option to pass extra certificates 2024-02-14 06:55:40 +01:00
Meta AK+LibXML+JSSpecCompiler: Move LineTrackingLexer to AK 2024-02-16 15:26:43 +01:00
Ports Ports/SDL2: Support ShowMessageBox before VideoInit 2024-02-15 12:33:23 +01:00
Tests LibWeb: Implement document.scrollingElement 2024-02-15 22:51:15 -05:00
Toolchain Kernel: Add initial basic support for KASAN 2023-12-30 13:57:10 +01:00
Userland LibPDF: Initial support for drawing CFF-based Type0 fonts 2024-02-16 12:41:10 -05:00
.clang-format Meta: Support using clang-format on Objective-C++ files 2023-08-22 21:36:19 -04:00
.clang-tidy Meta: Disable readability-function-cognitive-complexity in clang-tidy 2024-02-05 08:04:24 -07:00
.editorconfig Meta: Add .editorconfig 2022-09-10 17:32:55 +01:00
.gitattributes Repository: Protect port patches from CRLF/LF normalization 2022-01-12 01:08:38 +01:00
.gitignore Meta: Move .DS_Store rule to the bottom of the .gitignore file 2023-11-14 14:53:37 -05:00
.gn Meta: Automatically generate a compilation database for clangd 2023-11-14 14:29:35 -05:00
.mailmap Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2023-07-15 16:21:29 +02:00
.pre-commit-config.yaml Meta: Add a post-commit commit message linter hook 2021-05-02 16:28:01 +02:00
.prettierignore LibJS: Add DisposableStack{, Prototype, Constructor} 2023-01-23 09:56:50 +00:00
.prettierrc Meta: Move prettier config files to the root of the repository 2020-08-24 18:21:33 +02:00
.ycm_extra_conf.py Meta: Remove i686 references in YCM configuration 2022-12-28 11:53:41 +01:00
azure-pipelines.yml CI: Remove extraneous toolchain job from Azure CI 2022-12-28 15:26:12 -05:00
CMakeLists.txt Meta: Replace run.sh by run.py 2023-12-15 00:11:50 +01:00
CONTRIBUTING.md Meta: Add a note about resolving PR review comments 2023-10-18 13:32:13 +02:00
LICENSE Meta: Update the year range in LICENSE 2024-01-06 17:39:16 -05:00
README.md Everywhere: Remove references to UserspaceEmulator 2024-01-29 20:20:55 +00:00
SECURITY.md Meta: Add a security policy 2022-06-29 03:29:27 +00:00

SerenityOS

Graphical Unix-like operating system for x86-64 computers.

GitHub Actions Status Azure DevOps Status Fuzzing Status Sonar Cube Static Analysis Discord

FAQ | Documentation | Build Instructions

About

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

Roughly speaking, the goal is a marriage between the aesthetic of late-1990s productivity software and the power-user accessibility of late-2000s *nix. This is a system by us, for us, based on the things we like.

You can watch videos of the system being developed on YouTube:

Screenshot

Screenshot as of c03b788.png

Features

  • Modern x86 64-bit kernel with pre-emptive multi-threading
  • Browser with JavaScript, WebAssembly, and more (check the spec compliance for JS, CSS, and Wasm)
  • Security features (hardware protections, limited userland capabilities, W^X memory, pledge & unveil, (K)ASLR, OOM-resistance, web-content isolation, state-of-the-art TLS algorithms, ...)
  • System services (WindowServer, LoginServer, AudioServer, WebServer, RequestServer, CrashServer, ...) and modern IPC
  • Good POSIX compatibility (LibC, Shell, syscalls, signals, pseudoterminals, filesystem notifications, standard Unix utilities, ...)
  • POSIX-like virtual file systems (/proc, /dev, /sys, /tmp, ...) and ext2 file system
  • Network stack and applications with support for IPv4, TCP, UDP; DNS, HTTP, Gemini, IMAP, NTP
  • Profiling, debugging and other development tools (Kernel-supported profiling, CrashReporter, interactive GUI playground, HexEditor, HackStudio IDE for C++ and more)
  • Libraries for everything from cryptography to OpenGL, audio, JavaScript, GUI, playing chess, ...
  • Support for many common and uncommon file formats (PNG, JPEG, GIF, MP3, WAV, FLAC, ZIP, TAR, PDF, QOI, Gemini, ...)
  • Unified style and design philosophy, flexible theming system, custom (bitmap and vector) fonts
  • Games (Solitaire, Minesweeper, 2048, chess, Conway's Game of Life, ...) and demos (CatDog, Starfield, Eyes, mandelbrot set, WidgetGallery, ...)
  • Every-day GUI programs and utilities (Spreadsheet with JavaScript, TextEditor, Terminal, PixelPaint, various multimedia viewers and players, Mail, Assistant, Calculator, ...)

... and all of the above are right in this repository, no extra dependencies, built from-scratch by us :^)

Additionally, there are over three hundred ports of popular open-source software, including games, compilers, Unix tools, multimedia apps and more.

How do I read the documentation?

Man pages are available online at man.serenityos.org. These pages are generated from the Markdown source files in Base/usr/share/man and updated automatically.

When running SerenityOS you can use man for the terminal interface, or help for the GUI.

Code-related documentation can be found in the documentation folder.

How do I build and run this?

See the SerenityOS build instructions. Serenity runs on Linux, macOS (aarch64 might be a challenge), Windows (with WSL2) and many other *Nixes with hardware or software virtualization.

Get in touch and participate!

Join our Discord server: SerenityOS Discord

Before opening an issue, please see the issue policy.

A general guide for contributing can be found in CONTRIBUTING.md.

Authors

And many more! See here for a full contributor list. The people listed above have landed more than 100 commits in the project. :^)

License

SerenityOS is licensed under a 2-clause BSD license.