Will the criminal court assign a lawyer to the defendant?

Law firms can accept the entrustment of criminal suspects and defendants or their legal representatives, relatives or clients, and can also accept the designation of people's courts to appoint lawyers to provide legal aid or act as defenders for criminal suspects and defendants; You can accept the entrustment of the victims and their legal representatives or close relatives, the parties involved in incidental civil litigation and their legal representatives, the private prosecutors in private prosecution cases and their legal representatives, and entrust lawyers to act as litigation agents; You can accept the entrustment of the parties to a criminal case and their legal representatives and close relatives, and appoint a lawyer as the agent of the appeal case; You can accept the entrustment of the person who is not prosecuted and his legal representative or close relatives, and entrust a lawyer to appeal on his behalf; After the public security organ and the people's procuratorate make a decision not to file a case or reject the prosecution, they may accept the entrustment of the victim, his legal representative or close relatives and entrust a lawyer to appeal or prosecute on his behalf.