1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00
Javier Eguiluz f71b6c7396 Add woff2 fonts and other font related tweaks (#752)
The following changes are made in this commit:

**(1)** Add the WOFF2 variant of web fonts. [WOFF2 standard](https://w3c.github.io/woff/woff2/) reduces the file sizes significantly. This is important to make our website more accessible to folks with limited Internet connections.

96% of browsers support WOFF2 ([source](https://caniuse.com/?search=woff2)) and we still have WOFF and TTF/OTF/EOT formats for those edge-cases which don't support it.

Real examples of the file size reductions for php.net:

```
Fira Sans Regular: 183 KB (woff) -> 129 KB (woff2) --> 30% reduction in size
Fira Mono Regular:  87 KB (woff) ->  65 KB (woff2) --> 35% reduction in size
```

**(2)** Use `font-display: swap` for web fonts (see [MDN Docs for font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display))

This is recommended to not block the rendering the page for a long time if the web font is not available. Again, this is important for folks with suboptimal network connections.

The `swap` value is also the default option in popular font services like [Google Fonts](https://fonts.google.com/).

**(3)** Update the list of alternative font families.

I updated the sans-serif and mono font stack used in the design. The new stacks are much longer (not a problem in practice thanks to CSS variables) but they cover all common browsing devices (including smartphones). I crafted the list from the recommended font stacks of the most popular CSS frameworks and the most popular websites for developers.
2023-07-19 12:01:23 +01:00
2023-06-09 13:18:27 +01:00
2023-06-26 14:19:29 +01:00
2023-07-05 01:31:56 +02:00
2023-07-06 16:52:24 +02:00
2022-12-14 11:33:11 +00:00
2023-07-06 16:52:24 +02:00
2023-06-26 14:19:29 +01:00
2012-01-24 17:02:34 +01:00
2022-07-03 20:33:22 +02:00
2022-11-03 08:30:50 +00:00
2018-10-17 10:51:08 +02:00
2022-11-28 03:00:31 +03:00
2022-06-10 12:45:10 +02:00
2022-06-10 12:45:10 +02:00
2022-06-10 12:45:10 +02:00
2022-06-10 12:45:10 +02:00
2022-06-10 12:45:10 +02:00
2022-08-31 12:43:03 +03:00
2021-04-20 03:27:13 +00:00
2022-12-08 14:57:26 +03:00
2022-09-28 15:17:09 +01:00
2022-08-22 18:59:14 +02:00
2022-07-08 23:26:41 +02:00
2018-10-17 12:37:26 +02:00

Integrate

Local development

This is the git repository for the official www.php.net website.

To setup a local mirror of the website, clone the repository:

git clone https://github.com/php/web-php.git

Change into web-php:

cd web-php

Start the built-in web server:

php -S localhost:8080 .router.php

This repository includes most (generated) files that are required for normal operation of this website, such as

  • News & events data
  • Several manual pages (and a translation), see manual/{en,ja}/
  • User contributed notes for manual pages
  • A "router" for the builtin PHP webserver

How to set up a full local mirror is described in our Wiki: https://wiki.php.net/web/mirror

Code requirements

Code must function on a vanilla PHP 7.3 installation. Please keep this in mind before filing a pull request.

Contributing

Please have a look at CONTRIBUTING.md.

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:26:27.645Z
Readme 201 MiB
Languages
PHP 94.4%
CSS 2.6%
JavaScript 2.5%
PowerShell 0.2%
TypeScript 0.2%