console-table icon indicating copy to clipboard operation
console-table copied to clipboard

Wrong spacing with emojis

Open lefuturiste opened this issue 4 years ago • 2 comments

Hi ! Thanks you for this library but there is an issue with emojis in general 😄📚.

Code that breaks

<?php
require_once __DIR__ . "/../vendor/autoload.php";

$table = new LucidFrame\Console\ConsoleTable();
$table = $table
  ->addHeader("A")
  ->addHeader("B")
  ->addRow()
    ->addColumn("📚")
    ->addColumn("Hello")
  ->addRow()
    ->addColumn("X")
    ->addColumn("Foo Bared")
  ->display();

Expected behavior:

image

Actual behavior:

image

Environment

Shell: fish 3.3.1 PHP 8.0.12 (cli) phplucidframe/console-table: ^1.2

lefuturiste avatar Nov 14 '21 12:11 lefuturiste

I have the same problem :)

PSF1 avatar Jan 09 '24 12:01 PSF1

Isn't this depending on the used font? Perhaps find a monospace font where smileys also occupy just 1 space

flip111 avatar Jan 13 '24 16:01 flip111