4 letters, 40% of all letters are bold. // [1] https://patents.google.com/patent/DE102017112916A1/en if ($_SERVER['HTTP_HOST'] == 'localhost') { $main_url = "http://localhost/public_html_git"; } else { $main_url = "https://tilde.team/~grizzly"; } if(!isset($_COOKIE['settings'])) { $init = json_encode( array( "fontSize" => 18, "lineHeight" => 2, "wordSpacing" => 2, "style" => "ground" )); setcookie('settings', $init, time() + (86400 * 30 * 30), "/"); $fontSize = 18; $lineHeight = 2; $wordSpacing = 2; $mystyle = "ground"; } else { $settings = json_decode($_COOKIE['settings']); $fontSize = $settings->fontSize; $lineHeight = $settings->lineHeight; $wordSpacing = $settings->wordSpacing; $mystyle = $settings->style; } if(isset($_POST['settings'])) { $update = json_encode( array( "fontSize" => (int)$_POST['fontsize'], "lineHeight" => (int)$_POST['lineheight'], "wordSpacing" => (int)$_POST['wordspacing'], "style" => $_POST['style'] )); setcookie('settings', $update, time() + (86400 * 30 * 30), "/"); $fontSize = (int)$_POST['fontsize']; $lineHeight = (int)$_POST['lineheight']; $wordSpacing = (int)$_POST['wordspacing']; $mystyle = $_POST['style']; } if(!isset($_COOKIE['theme'])) { setcookie('theme', 'dark', time() + (86400 * 30 * 30), "/"); $theme = 'dark'; } else { $theme = $_COOKIE['theme']; } if (@$_GET['theme'] == 'dark') { setcookie('theme', 'dark', time() + (86400 * 30 * 30), "/"); header("Location: " . $main_url."/bionic-reading.php"); } if (@$_GET['theme'] == 'light') { setcookie('theme', 'light', time() + (86400 * 30 * 30), "/"); header("Location: " . $main_url."/bionic-reading.php"); } $str = $_POST['text']; $arr = explode(" ", $str); // $arr = str_word_count($str, 1); function style($m) { $word = $m[0]; $count = strlen($word); if ( $count <= 3 ) { // If there are <= 3 letters, one letter is bold. return "" . substr($word, 0, 1) . "" . substr($word, 1); } elseif ( $count == 4 ) { // If there are == 4 letters, two letters are bold. return "" . substr($word, 0, 2) . "" . substr($word, 2); } elseif ( $count > 4 ) { // If there are > 4 letters, 40% of all letters are bold. $ch = $count / 100 * 40; $c = (int)$ch; return "" . substr($word, 0, $c) . "" . substr($word, $c); } else { return $word; } } $output = array_map(function($word) { $word = preg_replace_callback('/\w+/i', 'style', $word); return $word; }, $arr); ?> grizzly’s space
~grizzly security does not exist, no system is safe <- back to tilde.team
light mode'; } if ($theme == 'light') { echo 'dark mode'; } ?>
".join($output, " ")."

"; } else { ?>

did you know that your brain reads faster than your eye? my implementation according to german patent for fast text reading

settings
[previous] [random] [next]
how to join this webring
'; } ?>