dtnbjjq51949 2019-01-27 07:30 采纳率: 0%
浏览 178

POS默认字体打印

Hello i have a dot matrix print EPSON TM-220PD, how can I use its default font in web printing. I am using woocommerce POS, the fontstyle being print in the receipt is the ones that i declared in its template.

     <style>
    /* Reset */
    * {
      background: transparent !important;
      color: #000 !important;
      box-shadow: none !important;
      text-shadow: none !important;
      width:90%;
      align:center;
    }
    body, table {
    font-family: 'monospace', monospace;
    text-transform: uppercase;
      line-height: 1.2;
      font-size: 10px;
      width:100%;
    }
    h1,h2,h3,h4,h5,h6 {
        text-align:center;
      margin: 0;
    }
    table {
      border-collapse: collapse;
      border-spacing: 0;
    }

    .footer-notes {
        font-size:9px;
        text-align:center;
        White-space:nowrap;
        width:100%;
    }
    .orderdiv{
        width:120%;
    }
   .order-header {
        white-space:nowrap;
    }
    .contact-info {
        text-align:center;
        font-size:11px;
    }
    /* Spacing */
    .order-branding, .order-addresses, .order-info, .order-items, .order-notes, .order-thanks {
      margin-bottom: 10px;
    }

    /* Branding */
    .order-branding h1 {
      font-size: 2em;
      font-weight: bold;
    }

    /* Addresses */
    .order-addresses {
      display: table;
      width: 100%;
    }
    .billing-address, .shipping-address {
      display: table-cell;
      width: 100%;
    }

    /* Order */
    table {
      width: 100%;
    }

    table th, table td {
        align:center
    }
    table.order-info {
        white-space:nowrap;
        font-size:9px;
      border-top: 1px dashed #000;
    }
    table.order-info th {
      text-align: left;
      width: 100%;
    }

    table.order-items {
      border-bottom: 1px dashed #000;
    }
    table.order-items thead tr {
      border-bottom: 1px dashed #000;
      width:100%;
    }

    .order-info {
        margin-top: 10px;
    }
    .product {
      text-align: left;
    }
    .product dl {
      margin: 0;
    }
    .product dt {
      font-weight: 100;
      padding-right: 6px;
      float: left;
      clear: left;
    }
    .product dd {
      float: left;
      margin: 0;
    }
    .price {
      text-align: right;
    }
    .qty {
      text-align: center;
    }
    .order-notes {
        text-align: left;
        font-size: 13px;
        word-wrap: break-word;
        width:100%;
    }
    table td.product {
         display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width:90%;
    }
    table td.variable {
     white-space: nowrap;
    max-width:90%;
    }
    table td.price {
          white-space: nowrap;
    overflow: hidden;
    }

    tfoot {
      text-align: right;
    }
    tfoot th {
      width: 70%;
    }
    tfoot tr.subtotal {
        Display:none;
    }
    tfoot tr.cart-discount {
        display:none;
    }
    tfoot tr.order-total {
      font-weight: bold;
    }

  </style>

i want to use the default font of my POS which is fonta11 that is not supported in the css. thanks for the answers

  • 写回答

1条回答 默认 最新

  • dotwc62080 2019-01-27 10:51
    关注

     Well, you must first convert this font to web fonts

    For example, via this website or similar to this:

    https://transfonter.org

    And then you have fonts in formats: eot woff otf svg

    With the code below, you will see this font in css

    @ font-face {
    font-family: "font11";
    src: url ("css / fonts / fonta11.eot");
    src:
    url ("css / fonts / fonta11.woff") format ("woff"),
    url ( "css / fonts / fonta11.otf") format ( "opentype"),
    url ("css / fonts / fonta11.svg # filename") format ("svg");
    }
    

    And then for example

    h1 {
    font-family: 'fonta11', arial, sans-serif;
    font-weight: normal;
    font-style: normal;
    }
    
    评论

报告相同问题?

悬赏问题

  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 ubuntu系统下挂载磁盘上执行./提示权限不够
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
  • ¥30 3天&7天&&15天&销量如何统计同一行